WordPress开发者和主题制作者的搜索引擎



post_class ›

Since2.7.0
已弃用n/a
apply_filters( 'post_class', $classes, $class, $post->ID )
参数: (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
定义在:
文档:

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





源码

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