mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-10-06 07:36:58 +00:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user