From 8a7ca493ad1460501a73437c8ff6f0b127a5d367 Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Tue, 10 Jul 2012 20:46:22 +0000 Subject: [PATCH] Admin bar: Avoid clash with a parent node and a 'content' post type. see #21117. git-svn-id: https://develop.svn.wordpress.org/trunk@21258 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/admin-bar.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/wp-includes/admin-bar.php b/wp-includes/admin-bar.php index 1b23dad80f..2dfb4ff125 100644 --- a/wp-includes/admin-bar.php +++ b/wp-includes/admin-bar.php @@ -508,6 +508,9 @@ function wp_admin_bar_new_content_menu( $wp_admin_bar ) { $key = 'post-new.php?post_type=' . $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' ) ) $actions[ 'user-new.php' ] = array( _x( 'User', 'add new from admin bar' ), 'new-user' );