Opened 15 months ago
Last modified 15 months ago
#63715 new enhancement
Ability to upload plugins directly from Plugins Menu
| Reported by: | Presskopp | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | Awaiting Review |
| Component: | Administration | Version: | |
| Severity: | normal | Keywords: | |
| Cc: | Focuses: | administration |
Description
The idea is to put another menu entry under 'Plugins' named 'Upload plugin' to get direct access to the upload modal
Change History (4)
#2
@
15 months ago
Very appreciated. I've been wondering for a long time why you have to click so much for the upload interface. Great addition 💯
#3
@
15 months ago
While I appreciate the suggestion, I believe adding a separate 'Upload Plugin' menu entry may introduce unnecessary complexity to the Plugins menu. The ability to upload plugins is a subset of adding plugin to site which is already present in a submenu 'Add Plugin'. Moreover, I believe the majority of users typically install plugins directly from the plugin directory, so further dividing the menu may not improve the overall user experience.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Patch:
add
$submenu['plugins.php'][20] = array( __( 'Upload Plugin' ), 'install_plugins', 'plugin-upload.php' );to
menu.php(~ L.306)if ( ! is_multisite() ) { $submenu['plugins.php'][10] = array( __( 'Add Plugin' ), 'install_plugins', 'plugin-install.php' ); if ( wp_is_block_theme() ) { // Place the menu item below the Theme File Editor menu item. add_action( 'admin_menu', '_add_plugin_file_editor_to_tools', 101 ); } else { $submenu['plugins.php'][15] = array( __( 'Plugin File Editor' ), 'edit_plugins', 'plugin-editor.php' ); } $submenu['plugins.php'][20] = array( __( 'Upload Plugin' ), 'install_plugins', 'plugin-upload.php' ); }and create a new file under
wp/adminnamedplugin-upload.phphaving the following content:<?php require_once dirname( __FILE__ ) . '/admin.php'; if ( ! current_user_can( 'install_plugins' ) ) { wp_die( __( 'Sorry, you are not allowed to install plugins on this site.' ) ); } $_REQUEST['tab'] = 'upload'; require_once ABSPATH . 'wp-admin/plugin-install.php';