AnsPress_Rewrite::alter_the_query( array $request )
Description #
Filter global request array.
Parameters #
- $requestarray (Required) Request array.
Source #
File: includes/rewrite.php
public static function alter_the_query( $request ) { if ( isset( $request['post_type'] ) && 'answer' === $request['post_type'] ) { if ( ! empty( $request['feed'] ) ) { unset( $request['question_id'] ); unset( $request['answer'] ); } if ( isset( $request['embed'] ) && 'true' === $request['embed'] ) { $request['p'] = $request['answer_id']; } } return $request; }
Expand full source code Collapse full source code View on GitHub: includes/rewrite.php:37
Add your comment