post_limits
Filters the LIMIT clause of the query.
Usage
add_filter( 'post_limits', 'wp_kama_post_limits_filter' );
/**
* Function for `post_limits` filter-hook.
*
* @param string $limits The LIMIT clause of the query.
*
* @return string
*/
function wp_kama_post_limits_filter( $limits ){
// filter...
return $limits;
}
- $limits(string)
- The LIMIT clause of the query.
Changelog
| Since 2.1.0 | Introduced. |
Where the hook is called
post_limits
wp-includes/class-wp-query.php 2983
$limits = apply_filters_ref_array( 'post_limits', array( $limits, &$this ) );