WordPress.org

Make WordPress Core

Ticket #37495: uploader-filter3.diff

File uploader-filter3.diff, 1.8 KB (added by DavidAnderson, 4 years ago)

Third version: Also restores the calling of install_plugins_pre_upload

  • wp-admin/plugin-install.php

     
    6464 *
    6565 * @since 2.7.0
    6666 */
    67 do_action( "install_plugins_pre_$tab" );
     67do_action( "install_plugins_pre_upload" );
     68if ( $tab !== 'upload' ) do_action( "install_plugins_pre_$tab" );
    6869
    6970get_current_screen()->add_help_tab( array(
    7071'id'            => 'overview',
     
    130131 * Output the upload plugin form on every plugin install screen, so it can be
    131132 * displayed via JavaScript rather then opening up the devoted upload plugin page.
    132133 */
    133 install_plugins_upload(); ?>
     134 
     135/**
     136 * Fires after the plugins list table in each tab of the Install Plugins screen.
     137 *
     138 * @since 2.7
     139 *
     140 */
     141do_action('install_plugins_upload'); ?>
    134142</div>
    135143
    136144<?php
     
    149157 *
    150158 * @param int $paged The current page number of the plugins list table.
    151159 */
    152 do_action( "install_plugins_$tab", $paged ); ?>
     160if ( $tab !== 'upload' ) do_action( "install_plugins_$tab", $paged ); ?>
    153161
    154162        <span class="spinner"></span>
    155163</div>
  • wp-admin/includes/admin-filters.php

     
    7070
    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' );
    7576add_action( 'install_plugins_recommended',            'display_plugins_table' );