parse_query WordPress Action Hook

The parse_query hook is one of the most versatile and powerful hooks in WordPress. It is called when a new query is being run on the database and allows you to modify the query before it is executed. This hook is used by many plugins and themes to alter the default behavior of WordPress.

do_action_ref_array( 'parse_query', WP_Query $query ) #

Fires after the main query vars have been parsed.


Parameters

$query

(WP_Query)The WP_Query instance (passed by reference).


Top ↑

More Information

parse_query is an action triggered after WP_Query->parse_query() has set up query variables (such as the various is_ variables used for conditional tags).


Top ↑

Source

File: wp-includes/class-wp-query.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
1.5.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.

Show More