pre_count_many_users_posts

FILTER wp-includes\user.php (ligne 681) github
Filters whether to short-circuit performing the post counts. When filtering, return an array of posts counts as strings, keyed by the user ID.

Paramètres

Entrée :
null, $users, $post_type, $public_only
Sortie :
@param string[]|null   $count       The post counts. Return a non-null value to short-circuit.
@param int[]           $users       Array of user IDs.
@param string|string[] $post_type   Single post type or array of post types to check.
@param bool            $public_only Whether to only return counts for public posts.

Utilisation

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

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

Actualités

Chargement des actualités...