Adjust [29634] so the Upload Plugin button can be shown. see #29236.

Built from https://develop.svn.wordpress.org/trunk@29637


git-svn-id: http://core.svn.wordpress.org/trunk@29411 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrew Nacin 2014-08-27 02:59:16 +00:00
parent 8f6fbcdc52
commit 69204000ca

View File

@ -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] = "<a href='$href' class='$class'>$text</a>";
}
// No longer a real tab.
unset( $display_tabs['plugin-install-upload'] );
return $display_tabs;
}