Handle 'appearance' as a admin bar menu parent in a backwards compatible way. fixes #19245.
git-svn-id: https://develop.svn.wordpress.org/trunk@19365 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
36776d3bb0
commit
f4fe632477
@ -112,9 +112,17 @@ class WP_Admin_Bar {
|
||||
}
|
||||
|
||||
public function render() {
|
||||
|
||||
$back_compat_parents = array(
|
||||
'appearance' => 'site-name',
|
||||
);
|
||||
|
||||
// Link nodes to parents.
|
||||
foreach ( $this->nodes as $node ) {
|
||||
|
||||
if ( isset( $back_compat_parents[ $node->parent ] ) )
|
||||
$node->parent = $back_compat_parents[ $node->parent ];
|
||||
|
||||
// Handle root menu items
|
||||
if ( empty( $node->parent ) ) {
|
||||
$parent = $this->root;
|
||||
|
Loading…
Reference in New Issue
Block a user