post_class_taxonomies

post_class_taxonomies

Hook Type: filter

See hook in core

Displaying hooks found in version: wordpress-6.7

apply_filters('post_class_taxonomies') is found 1 times:

  • /wp-includes/post-template.php line 572
    	 * @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;