split_the_query

FILTER wp-includes\class-wp-query.php (ligne 3404) github
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.

Paramètres

Entrée :
$split_the_query, $this, $old_request, compact( $pieces
Sortie :
@param bool     $split_the_query Whether or not to split the query.
@param WP_Query $query           The WP_Query instance.
@param string   $old_request     The complete SQL query before filtering.
@param string[] $clauses {

Utilisation

// Modifier la valeur avec le filtre 'split_the_query'
add_filter('split_the_query', 'ma_fonction_filtre', 10, 1);

function ma_fonction_filtre($split_the_query) {
    // Modifier la valeur
    return $split_the_query;
}

Actualités

Chargement des actualités...