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
This commit is contained in:
Helen Hou-Sandí 2015-10-01 00:48:25 +00:00
parent 145deeeada
commit 7365e0ebbb
2 changed files with 2 additions and 2 deletions

View File

@ -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' );

View File

@ -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.