ap_question_have_tags( false|int $question_id = false )

Description #

Check if question have tags.

Parameters #

  • $question_id
    false | int (Optional) Question id. Default value: false

Source #

File: includes/taxo.php

function ap_question_have_tags( $question_id = false ) {
	if ( ! $question_id ) {
		$question_id = get_the_ID(); }

	$tags = wp_get_post_terms( $question_id, 'question_tag' );

	if ( ! empty( $tags ) ) {
		return true; }

	return false;
}

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