Automattic\WooCommerce\Internal\Admin\Onboarding

OnboardingThemes::get_theme_data()public staticWC 1.0

Get theme data used in onboarding theme browser.

Метод класса: OnboardingThemes{}

Хуков нет.

Возвращает

Массив.

Использование

$result = OnboardingThemes::get_theme_data( $theme );
$theme(WP_Theme) (обязательный)
Theme to gather data from.

Код OnboardingThemes::get_theme_data() WC 8.7.0

public static function get_theme_data( $theme ) {
	return array(
		'slug'                    => sanitize_text_field( $theme->stylesheet ),
		'title'                   => $theme->get( 'Name' ),
		'price'                   => '0.00',
		'is_installed'            => true,
		'image'                   => $theme->get_screenshot(),
		'has_woocommerce_support' => true,
	);
}