wpseek.com
A WordPress-centric search engine for devs and theme authors



split_the_query › WordPress Filter Hooks

Since6.6.0
Deprecatedn/a
apply_filters( 'split_the_query', $split_the_query, $this, $old_request, compact( $pieces )
Parameters: (4)
  • () split_the_query Whether or not to split the query.
    Required: Yes
  • () query The WP_Query instance.
    Required: Yes
  • () old_request The complete SQL query before filtering.
    Required: Yes
  • () clauses { Associative array of the clauses for the query. @type string $where The WHERE clause of the query. @type string $groupby The GROUP BY clause of the query. @type string $join The JOIN clause of the query. @type string $orderby The ORDER BY clause of the query. @type string $distinct The DISTINCT clause of the query. @type string $fields The SELECT clause of the query. @type string $limits The LIMIT clause of the query. }
    Required: Yes
Defined at:
Codex:

Filters whether to split the query.

Splitting the query will cause it to fetch just the IDs of the found posts (and then individually fetch each post by ID), rather than fetching every complete row at once. One massive result vs. many small results.




Source

$split_the_query = apply_filters( 'split_the_query', $split_the_query, $this, $old_request, compact( $pieces ) );