Admin bar: Avoid clash with a parent node and a 'content' post type. see #21117.
git-svn-id: http://core.svn.wordpress.org/trunk@21258 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
6cb67e8817
commit
ebd7e61ac9
|
@ -508,6 +508,9 @@ function wp_admin_bar_new_content_menu( $wp_admin_bar ) {
|
||||||
$key = 'post-new.php?post_type=' . $cpt->name;
|
$key = 'post-new.php?post_type=' . $cpt->name;
|
||||||
$actions[ $key ] = array( $cpt->labels->name_admin_bar, 'new-' . $cpt->name );
|
$actions[ $key ] = array( $cpt->labels->name_admin_bar, 'new-' . $cpt->name );
|
||||||
}
|
}
|
||||||
|
// Avoid clash with parent node and a 'content' post type.
|
||||||
|
if ( isset( $actions['post-new.php?post_type=content'] ) )
|
||||||
|
$actions['post-new.php?post_type=content'][1] = 'add-new-content';
|
||||||
|
|
||||||
if ( current_user_can( 'create_users' ) || current_user_can( 'promote_users' ) )
|
if ( current_user_can( 'create_users' ) || current_user_can( 'promote_users' ) )
|
||||||
$actions[ 'user-new.php' ] = array( _x( 'User', 'add new from admin bar' ), 'new-user' );
|
$actions[ 'user-new.php' ] = array( _x( 'User', 'add new from admin bar' ), 'new-user' );
|
||||||
|
|
Loading…
Reference in New Issue