parse_request WordPress Action Hook

The parse_request hook is triggered after the WordPress request has been parsed, but before the actual query is run. This hook is useful for modifying the query variables before they are passed to the database.

do_action_ref_array( 'parse_request', WP $wp ) #

Fires once all query variables for the current request have been parsed.


Parameters

$wp

(WP)Current WordPress environment instance (passed by reference).


Top ↑

More Information

This action hook is executed at the end of WordPress’s built-in request parsing method in the main WP() class.

Attention! The parse_request hook affects only the main query and not queries made with wp_query, for example.


Top ↑

Source

File: wp-includes/class-wp.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
2.1.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.