AnsPress_Admin::append_post_status_list_edit()

Description #

Add AnsPress post status to bulk edit select box.

Source #

File: admin/anspress-admin.php

	public static function append_post_status_list_edit() {
		global $post;

		if ( in_array( $post->post_type, array( 'question', 'answer' ), true ) ) {
			echo '<script>
				jQuery( document ).ready( function() {
					jQuery( ".inline-edit-group select[name=\'_status\']" ).append( "<option value=\'moderate\'>' . esc_attr__( 'Moderate', 'anspress-question-answer' ) . '</option>" );
					jQuery( ".inline-edit-group select[name=\'_status\']" ).append( "<option value=\'private_post\'>' . esc_attr__( 'Private Post', 'anspress-question-answer' ) . '</option>" );
				} );
			</script>';
		}
	}

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Add your comment