Filters the taxonomies to generate classes for each individual term.
$taxonomiesstring[]$post_idint$classesstring[]$css_classstring[]wp-includes/post-template.php:572get_post_class() * * @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. */ $taxonomies = apply_filters( 'post_class_taxonomies', $taxonomies, $post->ID, $classes, $css_class ); foreach ( (array) $taxonomies as $taxonomy ) { if ( is_object_in_taxonomy( $post->post_type, $taxonomy ) ) { foreach ( (array) get_the_terms( $post->ID, $taxonomy ) as $term ) { if ( empty( $term->slug ) ) { continue;Introduced in 6.1.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.