mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 01:27:36 +01:00
Promote secondary admin bar items to primary if there are no primary items at time of render. see #19136, #19221.
git-svn-id: http://svn.automattic.com/wordpress/trunk@19236 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
019fa9e1e7
commit
c3fb2795b0
@ -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