From e6eda2b3f713f1fff0c03fc0674c026899cf31c9 Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Tue, 10 Jul 2012 21:26:35 +0000 Subject: [PATCH] Admin bar: When calling add_node() for an existing node, all properties should be merged into the existing arguments, including individual meta arguments. Corrects a logic inversion. fixes #21117. git-svn-id: https://develop.svn.wordpress.org/trunk@21259 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/class-wp-admin-bar.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-includes/class-wp-admin-bar.php b/wp-includes/class-wp-admin-bar.php index 53cc128319..b6f999381b 100644 --- a/wp-includes/class-wp-admin-bar.php +++ b/wp-includes/class-wp-admin-bar.php @@ -112,7 +112,7 @@ class WP_Admin_Bar { $defaults = get_object_vars( $maybe_defaults ); // Do the same for 'meta' items. - if ( ! empty( $defaults['meta'] ) && empty( $args['meta'] ) ) + if ( ! empty( $defaults['meta'] ) && ! empty( $args['meta'] ) ) $args['meta'] = wp_parse_args( $args['meta'], $defaults['meta'] ); $args = wp_parse_args( $args, $defaults );