posts_selection
Fires to announce the query's current selection parameters.
Description
For use by caching plugins.
Parameters (1)
- 0. $where_groupby_orderby_limits_join (string)
- The where groupby orderby limits join.
Usage
- To run the hook, copy the example below.
- // run the action
- do_action( 'posts_selection', $where_groupby_orderby_limits_join );
- The following example is for adding a hook callback.
- // define the posts_selection callback
- function action_posts_selection( $where_groupby_orderby_limits_join ) {
- // make action magic happen here...
- };
- // add the action
- add_action( 'posts_selection', 'action_posts_selection', 10, 1 );
- To remove a hook callback, use the example below.
- // remove the action
- remove_action( 'posts_selection', 'action_posts_selection', 10, 1 );
Defined (1)
The action is defined in the following location(s).
- /wp-includes/class-wp-query.php
- do_action( 'posts_selection', $where . $groupby . $orderby . $limits . $join );