A WordPress-centric search engine for devs and theme authors



post_class ›

Since2.7.0
Deprecatedn/a
apply_filters( 'post_class', $classes, $class, $post->ID )
Parameters: (3)
  • (string[]) $classes An array of post class names.
    Required: Yes
  • (string[]) $class An array of additional class names added to the post.
    Required: Yes
  • (int) $post_id The post ID.
    Required: Yes
Defined at:
Codex:

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





Source

$classes = apply_filters( 'post_class', $classes, $class, $post->ID );