Promote secondary admin bar items to primary if there are no primary items at time of render. see #19136, #19221.
git-svn-id: https://develop.svn.wordpress.org/trunk@19236 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
2b41063044
commit
fb32b677e2
@ -159,7 +159,12 @@ class WP_Admin_Bar {
|
||||
}
|
||||
|
||||
function recursive_render( $node ) {
|
||||
$is_parent = ! empty( $node->children->primary );
|
||||
if ( ! $node->children->primary && $node->children->secondary ) {
|
||||
$node->children->primary = $node->children->secondary;
|
||||
$node->children->secondary = array();
|
||||
}
|
||||
|
||||
$is_parent = (bool) $node->children->primary;
|
||||
|
||||
$menuclass = $is_parent ? 'menupop' : '';
|
||||
if ( ! empty( $node->meta['class'] ) )
|
||||
|
Loading…
Reference in New Issue
Block a user