AnsPress_Post_Status::register_post_status()

Description #

Register post status for question and answer CPT

Source #

File: includes/post-status.php

	public static function register_post_status() {
		register_post_status(
			'moderate',
			array(
				'label'                     => __( 'Moderate', 'anspress-question-answer' ),
				'public'                    => true,
				'show_in_admin_all_list'    => false,
				'show_in_admin_status_list' => true,
				// translators: %s is count of post awaiting moderation.
				'label_count'               => _n_noop( 'Moderate <span class="count">(%s)</span>', 'Moderate <span class="count">(%s)</span>', 'anspress-question-answer' ),
			)
		);

		register_post_status(
			'private_post',
			array(
				'label'                     => __( 'Private', 'anspress-question-answer' ),
				'public'                    => true,
				'show_in_admin_all_list'    => false,
				'show_in_admin_status_list' => true,
				// translators: %s is count of private post.
				'label_count'               => _n_noop( 'Private Post <span class="count">(%s)</span>', 'Private Post <span class="count">(%s)</span>', 'anspress-question-answer' ),
			)
		);
	}

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