WordPress.org

Make WordPress Core

Changeset 19555


Ignore:
Timestamp:
12/06/11 00:31:11 (2 years ago)
Author:
ryan
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/class-wp-admin-bar.php

    r19548 r19555  
    113113 
    114114        $args = wp_parse_args( $args, $defaults ); 
     115 
     116        $back_compat_parents = array( 
     117            'my-account-with-avatar' => array( 'my-account',  '3.3' ), 
     118            'my-blogs'               => array( 'my-sites', '3.3' ), 
     119        ); 
     120 
     121        if ( isset( $back_compat_parents[ $args['parent'] ] ) ) { 
     122            list( $new_parent, $version ) = $back_compat_parents[ $args['parent'] ]; 
     123            _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'] ) ); 
     124            $args['parent'] = $new_parent; 
     125        } 
    115126 
    116127        $this->_set_node( $args ); 
Note: See TracChangeset for help on using the changeset viewer.