On this page
apply_filters( 'page_css_class', string[] $css_class, WP_Post $page, int $depth, array $args, int $current_page_id )
Filters the list of CSS classes to include with each page item in the list.
Description
See also
Parameters
$css_classstring[]-
An array of CSS classes to be applied to each list item.
$pageWP_Post-
Page data object.
$depthint-
Depth of page, used for padding.
$argsarray-
An array of arguments.
$current_page_idint-
ID of the current page.
Source
File: wp-includes/class-walker-page.php. View all references
$css_classes = implode( ' ', apply_filters( 'page_css_class', $css_class, $page, $depth, $args, $current_page_id ) );
Related
Used By
| Used By | Description |
|---|---|
| Walker_Page::start_el() wp-includes/class-walker-page.php | Outputs the beginning of the current element in the tree. |
Changelog
| Version | Description |
|---|---|
| 2.8.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/page_css_class