diff --git a/wp-admin/includes/class-wp-plugin-install-list-table.php b/wp-admin/includes/class-wp-plugin-install-list-table.php index 0af8628cac..1f0306e1b2 100644 --- a/wp-admin/includes/class-wp-plugin-install-list-table.php +++ b/wp-admin/includes/class-wp-plugin-install-list-table.php @@ -70,7 +70,7 @@ class WP_Plugin_Install_List_Table extends WP_List_Table { } if ( current_user_can( 'upload_plugins' ) ) { // No longer a real tab. Here for filter compatibility. - // Gets juggled into $nonmenu_tabs below. + // Gets skipped in get_views(). $tabs['upload'] = __( 'Upload Plugin' ); } @@ -95,11 +95,6 @@ class WP_Plugin_Install_List_Table extends WP_List_Table { */ $nonmenu_tabs = apply_filters( 'install_plugins_nonmenu_tabs', $nonmenu_tabs ); - if ( isset( $tabs['upload'] ) ) { - unset( $tabs['upload'] ); - $nonmenu_tabs[] = 'upload'; - } - // If a non-valid menu tab has been selected, And it's not a non-menu action. if ( empty( $tab ) || ( !isset( $tabs[ $tab ] ) && !in_array( $tab, (array) $nonmenu_tabs ) ) ) $tab = key( $tabs ); @@ -215,6 +210,8 @@ class WP_Plugin_Install_List_Table extends WP_List_Table { $href = self_admin_url('plugin-install.php?tab=' . $action); $display_tabs['plugin-install-'.$action] = "$text"; } + // No longer a real tab. + unset( $display_tabs['plugin-install-upload'] ); return $display_tabs; }