WordPress.org

Make WordPress Core


Ignore:
Timestamp:
08/27/2014 01:31:05 AM (7 years ago)
Author:
nacin
Message:

Plugin/Theme Uploads: New capabilities; unify UIs; ensure compatibility with old filters.

Introduce upload_plugins and upload_themes capabilities to allow blocking of plugin and theme uploads, versus the old hacky (and not secure) ways of just hiding UI tabs. These are simply meta capabilities that map to install_plugins and install_themes.

Also:

  • Use the same nice design for the plugin upload screen as the theme upload screen.
  • Better compatibility for the old install_themes_tabs filter added in [29002]. see #28578.
  • Ensure using the install_plugins_tabs filter to remove the upload tab removes the new button.
  • Use 'Add Plugins' instead of 'Install Plugins' to match 'Add Themes'.

fixes #29236.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/plugin-install.php

    r29597 r29634  
    196196function install_plugins_upload( $page = 1 ) {
    197197?>
    198     <h4><?php _e('Install a plugin in .zip format'); ?></h4>
     198<div class="upload-plugin">
    199199    <p class="install-help"><?php _e('If you have a plugin in a .zip format, you may install it by uploading it here.'); ?></p>
    200200    <form method="post" enctype="multipart/form-data" class="wp-upload-form" action="<?php echo self_admin_url('update.php?action=upload-plugin'); ?>">
     
    204204        <?php submit_button( __( 'Install Now' ), 'button', 'install-plugin-submit', false ); ?>
    205205    </form>
     206</div>
    206207<?php
    207208}
Note: See TracChangeset for help on using the changeset viewer.