Make WordPress Core

Ticket #29236: 29236.patch

File 29236.patch, 1000 bytes (added by juliobox, 9 years ago)

Upload tab is back

  • plugin-install.php

     
    7777        <?php
    7878                echo esc_html( $title );
    7979                $href = self_admin_url( 'plugin-install.php?tab=upload' );
     80
     81                $tabs = array( 'upload' =>  __( 'Upload Plugin' ) );
     82                /**
     83                 * Filter the tabs shown on the Plugin Install screen.
     84                 *
     85                 * @since 2.7.0
     86                 *
     87                 * @param array $tabs The tabs shown on the Plugin Install screen. Defaults are 'dashboard', 'search',
     88                 *                    'upload', 'featured', 'popular', 'new', and 'favorites'.
     89                 */
     90                $tabs = apply_filters( 'install_plugins_tabs', $tabs );
     91                if ( isset( $tabs['upload'] ) ) {
     92                ?>
     93                        <a href="<?php echo $href; ?>" class="upload add-new-h2"><?php echo $tabs['upload']; ?></a>
     94                <?php
     95                }
    8096        ?>
    81         <a href="<?php echo $href; ?>" class="upload add-new-h2"><?php _e( 'Upload Plugin' ); ?></a>
    8297</h2>
    8398
    8499<?php $wp_list_table->views(); ?>