mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-02 17:40:01 +00:00
Plugin Install: show the upload form in place rather than sending users to the devoted upload plugin page.
Props Ipstenu, ericlewis, michaelarestad. Fixes #35429. git-svn-id: https://develop.svn.wordpress.org/trunk@37221 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -106,16 +106,31 @@ include(ABSPATH . 'wp-admin/admin-header.php');
|
||||
if ( ! empty( $tabs['upload'] ) && current_user_can( 'upload_plugins' ) ) {
|
||||
if ( $tab === 'upload' ) {
|
||||
$href = self_admin_url( 'plugin-install.php' );
|
||||
$text = _x( 'Browse', 'plugins' );
|
||||
$upload_tab_class = ' upload-tab';
|
||||
} else {
|
||||
$href = self_admin_url( 'plugin-install.php?tab=upload' );
|
||||
$text = __( 'Upload Plugin' );
|
||||
$upload_tab_class = '';
|
||||
}
|
||||
echo ' <a href="' . $href . '" class="upload page-title-action">' . $text . '</a>';
|
||||
|
||||
printf( ' <a href="%s" class="upload-view-toggle page-title-action%s"><span class="upload">%s</span><span class="browse">%s</span></a>',
|
||||
$href,
|
||||
$upload_tab_class,
|
||||
__( 'Upload Plugin' ),
|
||||
__( 'Browse Plugins' )
|
||||
);
|
||||
}
|
||||
?>
|
||||
</h1>
|
||||
|
||||
<div class="upload-plugin-wrap<?php echo $upload_tab_class; ?>">
|
||||
<?php
|
||||
/*
|
||||
* Output the upload plugin form on every plugin install screen, so it can be
|
||||
* displayed via JavaScript rather then opening up the devoted upload plugin page.
|
||||
*/
|
||||
install_plugins_upload(); ?>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
if ( $tab !== 'upload' ) {
|
||||
$wp_list_table->views();
|
||||
|
||||
Reference in New Issue
Block a user