page_css_class

page_css_class

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter
See hook in action

See hook in core

Displaying hooks found in version: wordpress-6.7.1

apply_filters('page_css_class') is found 1 times:

  • /wp-includes/class-walker-page.php line 159
    		 * @param int      $depth           Depth of page, used for padding.
    		 * @param array    $args            An array of arguments.
    		 * @param int      $current_page_id ID of the current page.
    		 */
    		$css_classes = implode( ' ', apply_filters( 'page_css_class', $css_class, $page, $depth, $args, $current_page_id ) );
    		$css_classes = $css_classes ? ' class="' . esc_attr( $css_classes ) . '"' : '';
    
    		if ( '' === $page->post_title ) {
    			/* translators: %d: ID of a post. */
    			$page->post_title = sprintf( __( '#%d (no title)' ), $page->ID );
    		}
    

See this hook used in plugins: