get_{$adjacent}_post_excluded_terms

FILTER wp-includes\link-template.php (ligne 1880) github
Filters the IDs of terms excluded from adjacent post queries. The dynamic portion of the hook name, `$adjacent`, refers to the type of adjacency, 'next' or 'previous'. Possible hook names include:  - `get_next_post_excluded_terms`  - `get_previous_post_excluded_terms`

Paramètres

Entrée :
$excluded_terms
Sortie :
@param int[]|string $excluded_terms Array of excluded term IDs. Empty string if none were provided.

Utilisation

// Modifier la valeur avec le filtre 'get_{$adjacent}_post_excluded_terms'
add_filter('get_{$adjacent}_post_excluded_terms', 'ma_fonction_filtre', 10, 1);

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

Actualités

Chargement des actualités...