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
This commit is contained in:
Helen Hou-Sandi 2015-10-01 00:47:22 +00:00
parent be98773ac9
commit 11144bd39e

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