Make WordPress Core

Ticket #28578: 28578.2.patch

File 28578.2.patch, 1.1 KB (added by ghost1227, 11 years ago)

Updated with inline docs and proper context

  • theme-install.php

     
    2727        $submenu_file = 'themes.php';
    2828}
    2929
     30$tabs = array(
     31        'upload'        => __( 'Upload Theme' ),
     32        'browse-themes' => _x( 'Browse', 'themes' )
     33);
     34
    3035$sections = array(
    3136        'featured' => __( 'Featured Themes' ),
    3237        'popular'  => __( 'Popular Themes' ),
     
    110115<div class="wrap">
    111116        <h2>
    112117                <?php echo esc_html( $title ); ?>
    113                 <a href="#" class="upload add-new-h2"><?php _e( 'Upload Theme' ); ?></a>
    114                 <a href="#" class="browse-themes add-new-h2"><?php _ex( 'Browse', 'themes' ); ?></a>
     118                <?php
     119                /**
     120                 * Filter the tabs shown on the Install Themes screen.
     121                 *
     122                 * @since 2.8.0
     123                 * @param array $tabs The tabs shown on the Install Themes screen. Defaults are
     124                 *                    'upload' and 'browse-themes'
     125                 */
     126                $tabs = apply_filters( 'install_themes_tabs', $tabs );
     127                foreach ( $tabs as $tab => $tab_name ) {
     128                        echo '<a href="#" class="' . $tab . ' add-new-h2">' . $tab_name . '</a>';
     129                }
     130                ?>
    115131        </h2>
    116132
    117133        <div class="upload-theme">