Adjust [29634] so the Upload Plugin button can be shown. see #29236.
git-svn-id: https://develop.svn.wordpress.org/trunk@29637 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
8564e3a491
commit
61ce27e467
|
@ -70,7 +70,7 @@ class WP_Plugin_Install_List_Table extends WP_List_Table {
|
||||||
}
|
}
|
||||||
if ( current_user_can( 'upload_plugins' ) ) {
|
if ( current_user_can( 'upload_plugins' ) ) {
|
||||||
// No longer a real tab. Here for filter compatibility.
|
// No longer a real tab. Here for filter compatibility.
|
||||||
// Gets juggled into $nonmenu_tabs below.
|
// Gets skipped in get_views().
|
||||||
$tabs['upload'] = __( 'Upload Plugin' );
|
$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 );
|
$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 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 ) ) )
|
if ( empty( $tab ) || ( !isset( $tabs[ $tab ] ) && !in_array( $tab, (array) $nonmenu_tabs ) ) )
|
||||||
$tab = key( $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);
|
$href = self_admin_url('plugin-install.php?tab=' . $action);
|
||||||
$display_tabs['plugin-install-'.$action] = "<a href='$href' class='$class'>$text</a>";
|
$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;
|
return $display_tabs;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue