post_class_taxonomies

FILTER wp-includes\post-template.php (ligne 572) github
Filters the taxonomies to generate classes for each individual term. Default is all public taxonomies registered to the post type.

Paramètres

Entrée :
$taxonomies, $post->ID, $classes, $css_class
Sortie :
@param string[] $taxonomies List of all taxonomy names to generate classes for.
@param int      $post_id    The post ID.
@param string[] $classes    An array of post class names.
@param string[] $css_class  An array of additional class names added to the post.

Utilisation

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

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

Actualités

Chargement des actualités...