post_limits_request filter-hookWP 2.5.0

Filters the LIMIT clause of the query.

For use by caching plugins.

Usage

add_filter( 'post_limits_request', 'wp_kama_post_limits_request_filter', 10, 2 );

/**
 * Function for `post_limits_request` filter-hook.
 * 
 * @param string   $limits The LIMIT clause of the query.
 * @param WP_Query $query  The WP_Query instance (passed by reference).
 *
 * @return string
 */
function wp_kama_post_limits_request_filter( $limits, $query ){

	// filter...
	return $limits;
}
$limits(string)
The LIMIT clause of the query.
$query(WP_Query)
The WP_Query instance (passed by reference).

Changelog

Since 2.5.0 Introduced.

Where the hook is called

WP_Query::get_posts()
post_limits_request
wp-includes/class-wp-query.php 2968
$limits = apply_filters_ref_array( 'post_limits_request', array( $limits, &$this ) );

Where the hook is used in WordPress

Usage not found.