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:
parent
15ff65a694
commit
249cee46a3
|
@ -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