我该怎么做?我正在开发自定义菜单功能,我知道我必须使用start_lvl
public function start_lvl( &$output, $depth = 0, $args = array() ) {
$indent = str_repeat( "\t", $depth );
$classes = get_parent_menu_item_classes(); // I NEED SOMETHING LIKE THIS
if ( in_array( 'column-header', $classes ) ) { // get the classes here
$output .= "\n$indent<ul role=\"menu\" class=\" nav nav-list\">\n";
} else {
$output .= "\n$indent<ul role=\"menu\" class=\" dropdown-menu\">\n";
}
}
请告知:)