Parses arguments passed to the site query with default query parameters.
Description
See also
Parameters
$query
string|arrayoptional- Array or string of WP_Site_Query arguments. See WP_Site_Query::__construct().
Default:
''
Source
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 site query vars have been parsed.
*
* @since 4.6.0
*
* @param WP_Site_Query $query The WP_Site_Query instance (passed by reference).
*/
do_action_ref_array( 'parse_site_query', array( &$this ) );
}
Hooks
- do_action_ref_array( ‘parse_site_query’,
WP_Site_Query $query ) Fires after the site query vars have been parsed.
Changelog
Version | Description |
---|---|
4.6.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.