From 11144bd39e7124e9b6735cef97bc11a7e39ae3c0 Mon Sep 17 00:00:00 2001 From: Helen Hou-Sandi Date: Thu, 1 Oct 2015 00:47:22 +0000 Subject: [PATCH] Don't show the "Add New" link on `post-new.php`. Using the same `$post_new_file` global variable name in `wp-admin/menu.php` in [33723] was unintentional, but we're already unsetting other variables that are in global scope so we can just unset this one as well. Someday the admin menu won't be a big pile of sad and cryptic globals. Maybe. props johnjamesjacoby, norcross. fixes #34045. git-svn-id: https://develop.svn.wordpress.org/trunk@34723 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/menu.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-admin/menu.php b/src/wp-admin/menu.php index 46b69cd62c..eaf997ac3c 100644 --- a/src/wp-admin/menu.php +++ b/src/wp-admin/menu.php @@ -135,7 +135,7 @@ foreach ( array_merge( $builtin, $types ) as $ptype ) { $submenu[ $ptype_file ][$i++] = array( esc_attr( $tax->labels->menu_name ), $tax->cap->manage_terms, sprintf( $edit_tags_file, $tax->name ) ); } } -unset($ptype, $ptype_obj, $ptype_for_id, $ptype_menu_position, $menu_icon, $i, $tax); +unset( $ptype, $ptype_obj, $ptype_for_id, $ptype_menu_position, $menu_icon, $i, $tax, $post_new_file ); $menu[59] = array( '', 'read', 'separator2', '', 'wp-menu-separator' );