post_class

post_class

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

See hook in core

Displaying hooks found in version: wordpress-5.5.1

apply_filters('post_class') is found 1 times:

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