Add back compat support for my-account-with-avatar admin bar node id. fixes #19426

git-svn-id: http://svn.automattic.com/wordpress/trunk@19555 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2011-12-06 00:31:11 +00:00
parent 32ff2db6dd
commit a39bffbadb
1 changed files with 11 additions and 0 deletions

View File

@ -113,6 +113,17 @@ class WP_Admin_Bar {
$args = wp_parse_args( $args, $defaults );
$back_compat_parents = array(
'my-account-with-avatar' => array( 'my-account', '3.3' ),
'my-blogs' => array( 'my-sites', '3.3' ),
);
if ( isset( $back_compat_parents[ $args['parent'] ] ) ) {
list( $new_parent, $version ) = $back_compat_parents[ $args['parent'] ];
_deprecated_argument( __METHOD__, $version, sprintf( 'Use <code>%s</code> as the parent for the <code>%s</code> admin bar node instead of <code>%s</code>.', new_parent, $args['id'], $args['parent'] ) );
$args['parent'] = $new_parent;
}
$this->_set_node( $args );
}