post_class_taxonomies

post_class_taxonomies

Appears in:
Hook Type: filter

See hook in core

Displaying hooks found in version: wordpress-6.1

apply_filters('post_class_taxonomies') is found 1 times:

  • /wp-includes/post-template.php line 563
    	 * @param int      $post_id    The post ID.
    	 * @param string[] $classes    An array of post class names.
    	 * @param string[] $class      An array of additional class names added to the post.
    	*/
    	$taxonomies = apply_filters( 'post_class_taxonomies', $taxonomies, $post->ID, $classes, $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;