ap_get_question( integer $question_id )
Description #
Get an question by ID.
Parameters #
- $question_idinteger (Required) Question ID.
Source #
File: includes/question-loop.php
function ap_get_question( $question_id ) { $args = array( 'p' => $question_id, 'ap_query' => 'single_question', 'post_status' => array( 'publish' ), ); if ( ap_user_can_view_future_post( $question_id ) ) { $args['post_status'][] = 'future'; } if ( ap_user_can_view_private_post( $question_id ) ) { $args['post_status'][] = 'private_post'; } if ( ap_user_can_view_moderate_post( $question_id ) ) { $args['post_status'][] = 'moderate'; } return new Question_Query( $args ); }
Expand full source code Collapse full source code View on GitHub: includes/question-loop.php:57
Add your comment