X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/61343b82c4f0da4c68e4c6373daafff4a81efdd1..784f914b1e4b1c62d6657e86397c2e83bcee4295:/wp-admin/includes/theme-install.php diff --git a/wp-admin/includes/theme-install.php b/wp-admin/includes/theme-install.php index 63be1d7e..27538b74 100644 --- a/wp-admin/includes/theme-install.php +++ b/wp-admin/includes/theme-install.php @@ -50,6 +50,8 @@ function install_themes_feature_list() { * Display search form for searching themes. * * @since 2.8.0 + * + * @param bool $type_selector */ function install_theme_search_form( $type_selector = true ) { $type = isset( $_REQUEST['type'] ) ? wp_unslash( $_REQUEST['type'] ) : 'term'; @@ -57,7 +59,7 @@ function install_theme_search_form( $type_selector = true ) { if ( ! $type_selector ) echo '

' . __( 'Search for themes by keyword.' ) . '

'; ?> -
+ @@ -99,7 +101,7 @@ function install_themes_dashboard() {

- + -

- - + + +
prepare_items(); $wp_list_table->single_row( $theme ); } @@ -162,24 +173,29 @@ function display_theme( $theme ) { * Display theme content based on theme list. * * @since 2.8.0 + * + * @global WP_Theme_Install_List_Table $wp_list_table */ function display_themes() { global $wp_list_table; + if ( ! isset( $wp_list_table ) ) { + $wp_list_table = _get_list_table('WP_Theme_Install_List_Table'); + } + $wp_list_table->prepare_items(); $wp_list_table->display(); + } -add_action('install_themes_search', 'display_themes'); -add_action('install_themes_featured', 'display_themes'); -add_action('install_themes_new', 'display_themes'); -add_action('install_themes_updated', 'display_themes'); /** * Display theme information in dialog box form. * * @since 2.8.0 + * + * @global WP_Theme_Install_List_Table $wp_list_table */ function install_theme_information() { - global $tab, $themes_allowedtags, $wp_list_table; + global $wp_list_table; $theme = themes_api( 'theme_information', array( 'slug' => wp_unslash( $_REQUEST['theme'] ) ) ); @@ -187,8 +203,10 @@ function install_theme_information() { wp_die( $theme ); iframe_header( __('Theme Install') ); + if ( ! isset( $wp_list_table ) ) { + $wp_list_table = _get_list_table('WP_Theme_Install_List_Table'); + } $wp_list_table->theme_installer_single( $theme ); iframe_footer(); exit; } -add_action('install_themes_pre_theme-information', 'install_theme_information');