Make WordPress Core


Ignore:
Timestamp:
07/31/2016 06:10:45 PM (9 years ago)
Author:
ocean90
Message:

Plugins: Use install_plugins_upload action to print the upload form.

Since [37221] the upload form is added to every plugin install screen via install_plugins_upload(). Previously the form was added through the install_plugins_upload (alias of install_plugins_$tab) action which allowed plugin authors to replace the form. This restores the previous behaviour.

  • Add the form only to non-upload plugin install screens.
  • Replace install_plugins_upload() with the install_plugins_upload and install_plugins_pre_upload actions.
  • Remove $upload_tab_class and add a CSS class for the current tab to .wrap
  • Adjust CSS selectors and toggle the whole container to support upload without an upload-plugin class.

Props DavidAnderson, ocean90.
Fixes #37495.

File:
1 edited

Legend:

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

    r38046 r38172  
    7171// Plugin Install hooks.
    7272add_action( 'install_plugins_featured',               'install_dashboard' );
     73add_action( 'install_plugins_upload',                 'install_plugins_upload' );
    7374add_action( 'install_plugins_search',                 'display_plugins_table' );
    7475add_action( 'install_plugins_popular',                'display_plugins_table' );
Note: See TracChangeset for help on using the changeset viewer.