WP_Comment_Query::parse_query
Parse arguments passed to the comment query with default query parameters.
Метод класса: WP_Comment_Query{}
Хуки из метода
Возвращает
null. Ничего (null).
Использование
$WP_Comment_Query = new WP_Comment_Query(); $WP_Comment_Query->parse_query( $query );
- $query(строка|массив)
- WP_Comment_Query arguments. See WP_Comment_Query::__construct() for accepted arguments.
По умолчанию:''
Список изменений
| С версии 4.2.0 | Введена. |
| С версии 4.2.0 | Extracted from WP_Comment_Query::query(). |
Код WP_Comment_Query::parse_query() WP Comment Query::parse query WP 7.1
public function parse_query( $query = '' ) {
if ( empty( $query ) ) {
$query = $this->query_vars;
}
$this->query_vars = wp_parse_args( $query, $this->query_var_defaults );
/**
* Fires after the comment query vars have been parsed.
*
* @since 4.2.0
*
* @param WP_Comment_Query $query The WP_Comment_Query instance (passed by reference).
*/
do_action_ref_array( 'parse_comment_query', array( &$this ) );
}