install_theme_information

函式
install_theme_information ( No parameters )

install_theme_information: 這個函式用來檢索一個給定主題的主題資訊。它把主題的名稱作為引數,並返回一個具有名稱、版本、描述和螢幕截圖等屬性的物件。

在對話方塊表單中顯示主題資訊。

function install_theme_information() {
	global $wp_list_table;

	$theme = themes_api( 'theme_information', array( 'slug' => wp_unslash( $_REQUEST['theme'] ) ) );

	if ( is_wp_error( $theme ) ) {
		wp_die( $theme );
	}

	iframe_header( __( 'Theme Installation' ) );
	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;
}

常見問題

FAQs
檢視更多 >