ap_question_have_category( false|int $post_id = false )
Description #
Check if question have category.
Parameters #
- $post_idfalse | int (Optional) Question id. Default value: false
Source #
File: includes/taxo.php
function ap_question_have_category( $post_id = false ) {
if ( ! $post_id ) {
$post_id = get_the_ID();
}
$categories = get_the_terms( $post_id, 'question_category' );
if ( ! empty( $categories ) ) {
return true;
}
return false;
}
Expand full source code Collapse full source code View on GitHub: includes/taxo.php:132
Add your comment