From 7365e0ebbbd8345f1cfcaa6b2130097ab33f6809 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Helen=20Hou-Sand=C3=AD?= Date: Thu, 1 Oct 2015 00:48:25 +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. Built from https://develop.svn.wordpress.org/trunk@34723 git-svn-id: http://core.svn.wordpress.org/trunk@34687 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/menu.php | 2 +- wp-includes/version.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-admin/menu.php b/wp-admin/menu.php index 46b69cd62c..eaf997ac3c 100644 --- a/wp-admin/menu.php +++ b/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' ); diff --git a/wp-includes/version.php b/wp-includes/version.php index a427ea30a4..50595711bc 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.4-alpha-34722'; +$wp_version = '4.4-alpha-34723'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.