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



page_css_class ›

Since2.8.0
已弃用n/a
apply_filters( 'page_css_class', $css_class, $page, $depth, $args, $current_page )
参数: (5)
  • (string[]) $css_class An array of CSS classes to be applied to each list item.
    Required: Yes
  • (WP_Post) $page Page data object.
    Required: Yes
  • (int) $depth Depth of page, used for padding.
    Required: Yes
  • (array) $args An array of arguments.
    Required: Yes
  • (int) $current_page ID of the current page.
    Required: Yes
查看:
  • wp_list_pages()
定义在:
文档:

Filters the list of CSS classes to include with each page item in the list.





源码

$css_classes = implode( ' ', apply_filters( 'page_css_class', $css_class, $page, $depth, $args, $current_page ) );