post_class

post_class

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter
See hook in action

See hook in core

Displaying hooks found in version: wordpress-6.4.3

apply_filters('post_class') is found 1 times:

  • /wp-includes/post-template.php line 605
    	 * @param string[] $classes   An array of post class names.
    	 * @param string[] $css_class An array of additional class names added to the post.
    	 * @param int      $post_id   The post ID.
    	 */
    	$classes = apply_filters( 'post_class', $classes, $css_class, $post->ID );
    
    	return array_unique( $classes );
    }
    
    /**
     * Displays the class names for the body element.
    

See this hook used in plugins: