posts_selection
Fires to announce the query's current selection parameters.
For use by caching plugins.
Usage
add_action( 'posts_selection', 'wp_kama_posts_selection_action' );
/**
* Function for `posts_selection` action-hook.
*
* @param string $selection The assembled selection query.
*
* @return void
*/
function wp_kama_posts_selection_action( $selection ){
// action...
}
- $selection(string)
- The assembled selection query.
Changelog
| Since 2.3.0 | Introduced. |
Where the hook is called
posts_selection
wp-includes/class-wp-query.php 3036
do_action( 'posts_selection', $where . $groupby . $orderby . $limits . $join );