Handle 'appearance' as a admin bar menu parent in a backwards compatible way. fixes #19245.

git-svn-id: http://svn.automattic.com/wordpress/trunk@19365 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
nacin 2011-11-20 18:39:54 +00:00
parent 15ff65a694
commit 249cee46a3
1 changed files with 8 additions and 0 deletions

View File

@ -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;