W3cubDocs

/WordPress

apply_filters( 'post_class', string[] $classes, string[] $class, int $post_id )

Filters the list of CSS class names for the current post.

Parameters

$classes

(string[]) An array of post class names.

$class

(string[]) An array of additional class names added to the post.

$post_id

(int) The post ID.

Source

File: wp-includes/post-template.php

View on Trac

Changelog

Version Description
2.7.0 Introduced.

© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/post_class