WordPress.org

Make WordPress Core


Ignore:
Timestamp:
03/11/2014 07:46:27 AM (8 years ago)
Author:
nacin
Message:

Bring the theme browsing experience from 3.8 to the theme installer. First pass.

props matveb with assists from me and gcorne.
see #27055.

File:
1 edited

Legend:

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

    r24189 r27499  
    133133<?php
    134134}
    135 add_action('install_themes_dashboard', 'install_themes_dashboard');
    136 
    137 function install_themes_upload($page = 1) {
     135// add_action('install_themes_dashboard', 'install_themes_dashboard');
     136
     137function install_themes_upload() {
    138138?>
    139 <h4><?php _e('Install a theme in .zip format'); ?></h4>
    140139<p class="install-help"><?php _e('If you have a theme in a .zip format, you may install it by uploading it here.'); ?></p>
    141140<form method="post" enctype="multipart/form-data" class="wp-upload-form" action="<?php echo self_admin_url('update.php?action=upload-theme'); ?>">
     
    146145    <?php
    147146}
    148 add_action('install_themes_upload', 'install_themes_upload', 10, 1);
     147// add_action('install_themes_upload', 'install_themes_upload', 10, 0);
    149148
    150149/**
     
    156155    _deprecated_function( __FUNCTION__, '3.4' );
    157156    global $wp_list_table;
     157    if ( ! isset( $wp_list_table ) ) {
     158        $wp_list_table = _get_list_table('WP_Theme_Install_List_Table');
     159    }
     160    $wp_list_table->prepare_items();
    158161    $wp_list_table->single_row( $theme );
    159162}
     
    167170    global $wp_list_table;
    168171
     172    if ( ! isset( $wp_list_table ) ) {
     173        $wp_list_table = _get_list_table('WP_Theme_Install_List_Table');
     174    }
     175    $wp_list_table->prepare_items();
    169176    $wp_list_table->display();
    170 }
    171 add_action('install_themes_search', 'display_themes');
    172 add_action('install_themes_featured', 'display_themes');
    173 add_action('install_themes_new', 'display_themes');
    174 add_action('install_themes_updated', 'display_themes');
     177
     178}
     179// add_action('install_themes_search', 'display_themes');
     180// add_action('install_themes_featured', 'display_themes');
     181// add_action('install_themes_new', 'display_themes');
     182// add_action('install_themes_updated', 'display_themes');
    175183
    176184/**
     
    180188 */
    181189function install_theme_information() {
    182     global $tab, $themes_allowedtags, $wp_list_table;
     190    global $wp_list_table;
    183191
    184192    $theme = themes_api( 'theme_information', array( 'slug' => wp_unslash( $_REQUEST['theme'] ) ) );
     
    188196
    189197    iframe_header( __('Theme Install') );
     198    if ( ! isset( $wp_list_table ) ) {
     199        $wp_list_table = _get_list_table('WP_Theme_Install_List_Table');
     200    }
    190201    $wp_list_table->theme_installer_single( $theme );
    191202    iframe_footer();
Note: See TracChangeset for help on using the changeset viewer.