post_class

post_class

Hook Type: filter
See hook in action
See hook in
Displaying hooks found in version: wordpress-5.3

apply_filters('post_class') is found 1 times:

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

See this hook used in plugins: