AP_QA_Query_Hooks::pre_get_posts( WP_Query $query )
Description #
Include all post status in single question so that we can show custom messages.
Parameters #
- $queryWP_Query (Required) Query loop.
Source #
File: includes/qaquery-hooks.php
public static function pre_get_posts( $query ) { if ( $query->is_single() && $query->is_main_query() && 'question' === get_query_var( 'post_type' ) ) { $query->set( 'post_status', array( 'publish', 'trash', 'moderate', 'private_post', 'future', 'ap_spam' ) ); } }
Expand full source code Collapse full source code View on GitHub: includes/qaquery-hooks.php:224
Add your comment