WP_Theme_Install_List_Table::theme_installer_single() WordPress Method

The WP_Theme_Install_List_Table::theme_installer_single() method is used to install a WordPress theme. This method takes two arguments: the WordPress theme to install and the URL of the WordPress theme. The method first checks if the WordPress theme is already installed. If it is, then the method exits. Otherwise, the method downloads the WordPress theme from the given URL and installs it.

WP_Theme_Install_List_Table::theme_installer_single( stdClass $theme ) #

Prints the wrapper for the theme installer with a provided theme’s data.


Description

Used to make the theme installer work for no-js.


Top ↑

Parameters

$theme

(stdClass)(Required)A WordPress.org Theme API object.


Top ↑

Source

File: wp-admin/includes/class-wp-theme-install-list-table.php

	public function theme_installer_single( $theme ) {
		?>
		<div id="theme-installer" class="wp-full-overlay single-theme">
			<div class="wp-full-overlay-sidebar">
				<?php $this->install_theme_info( $theme ); ?>
			</div>
			<div class="wp-full-overlay-main">
				<iframe src="<?php echo esc_url( $theme->preview_url ); ?>"></iframe>
			</div>
		</div>
		<?php
	}

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.