category_css_class

过滤钩子


apply_filters( 'category_css_class', $css_classes, $category, $depth, $args )
参数
  • (string[])
    $css_classes
    An array of CSS classes to be applied to each list item.
    Required:
  • (WP_Term)
    $category
    Category data object.
    Required:
  • (int)
    $depth
    Depth of page, used for padding.
    Required:
  • (array)
    $args
    An array of wp_list_categories() arguments.
    Required:
定义位置
  • wp-includes/class-walker-category.php
    , line 241
引入
4.2.0
弃用

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

$css_classes = implode( ' ', apply_filters( 'category_css_class', $css_classes, $category, $depth, $args ) );