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:
Andrew Nacin 2011-11-20 18:39:54 +00:00
parent 36776d3bb0
commit f4fe632477
1 changed files with 8 additions and 0 deletions

View File

@ -112,9 +112,17 @@ class WP_Admin_Bar {
} }
public function render() { public function render() {
$back_compat_parents = array(
'appearance' => 'site-name',
);
// Link nodes to parents. // Link nodes to parents.
foreach ( $this->nodes as $node ) { foreach ( $this->nodes as $node ) {
if ( isset( $back_compat_parents[ $node->parent ] ) )
$node->parent = $back_compat_parents[ $node->parent ];
// Handle root menu items // Handle root menu items
if ( empty( $node->parent ) ) { if ( empty( $node->parent ) ) {
$parent = $this->root; $parent = $this->root;