From 7a2af1c1006447a56ed0291fba3e0503051820e7 Mon Sep 17 00:00:00 2001 From: nacin Date: Thu, 18 Nov 2010 09:51:50 +0000 Subject: [PATCH] Second half of [16462]. props duck_. see #15308. git-svn-id: http://svn.automattic.com/wordpress/trunk@16463 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/admin-bar.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-includes/admin-bar.php b/wp-includes/admin-bar.php index 8f4df8a5a2..1bf99a8be4 100644 --- a/wp-includes/admin-bar.php +++ b/wp-includes/admin-bar.php @@ -196,7 +196,7 @@ function wp_admin_bar_new_content_menu() { foreach ( (array) get_post_types( array( 'show_ui' => true ), 'objects' ) as $ptype_obj ) { if ( true !== $ptype_obj->show_in_menu || ! current_user_can( $ptype_obj->cap->edit_posts ) ) continue; - $actions["post-new.php?post_type=$ptype"] = array( $ptype_obj->labels->singular_name, $ptype_obj->cap->edit_posts, "new-$ptype" ); + $actions[ 'post-new.php?post_type=' . $ptype_obj->name ] = array( $ptype_obj->labels->singular_name, $ptype_obj->cap->edit_posts, 'new-' . $ptype_obj->name ); } if ( empty( $actions ) )