ap_question_status( mixed $_post = null )

Description #

Echo post status of a question.

Parameters #

  • $_post
    mixed (Optional) Post ID, Object or null. Default value: null

Source #

File: includes/qaquery.php

function ap_question_status( $_post = null ) {
	$_post = ap_get_post( $_post );

	if ( 'publish' === $_post->post_status ) {
		return;
	}

	$status_obj = get_post_status_object( $_post->post_status );
	echo '<span class="ap-post-status ' . esc_attr( $_post->post_status ) . '">' . esc_attr( $status_obj->label ) . '</span>';
}

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