WordPress как на ладони
wordpress jino
фильтр не описан

split_the_query хук-фильтр . WP 3.4.0

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.

Использование

add_filter( 'split_the_query', 'filter_function_name_4696', 10, 2 );
function filter_function_name_4696( $split_the_query, $this ){
	// filter...

	return $split_the_query;
}
$split_the_query(true/false)
Whether or not to split the query.
$this(WP_Query)
The WP_Query instance.

Где используется хук

WP_Query::get_posts() остальные хуки:

Код хука

Фрагмент из: wp-includes/class-wp-query.php VER 4.9.7
...
		if ( null === $this->posts ) {
			$split_the_query = ( $old_request == $this->request && "{$wpdb->posts}.*" == $fields && !empty( $limits ) && $q['posts_per_page'] < 500 );

			/**
			 * 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.
			 *
			 * @since 3.4.0
			 *
			 * @param bool     $split_the_query Whether or not to split the query.
			 * @param WP_Query $this            The WP_Query instance.
			 */
			$split_the_query = apply_filters( 'split_the_query', $split_the_query, $this );

			if ( $split_the_query ) {
				// First get the IDs and then fill in the objects

				$this->request = "SELECT $found_rows $distinct {$wpdb->posts}.ID FROM {$wpdb->posts} $join WHERE 1=1 $where $groupby $orderby $limits";

				/**
				 * Filters the Post IDs SQL request before sending.
				 *
				 * @since 3.4.0
				 *
				 * @param string   $request The post ID request.
				 * @param WP_Query $this    The WP_Query instance.
				 */
				$this->request = apply_filters( 'posts_request_ids', $this->request, $this );
...