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: http://core.svn.wordpress.org/trunk@21259 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
ebd7e61ac9
commit
189e833139
|
@ -112,7 +112,7 @@ class WP_Admin_Bar {
|
||||||
$defaults = get_object_vars( $maybe_defaults );
|
$defaults = get_object_vars( $maybe_defaults );
|
||||||
|
|
||||||
// Do the same for 'meta' items.
|
// 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['meta'] = wp_parse_args( $args['meta'], $defaults['meta'] );
|
||||||
|
|
||||||
$args = wp_parse_args( $args, $defaults );
|
$args = wp_parse_args( $args, $defaults );
|
||||||
|
|
Loading…
Reference in New Issue