Automattic\WooCommerce\Internal\Admin\Onboarding
OnboardingThemes::get_theme_data()
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() OnboardingThemes::get theme data WC 9.2.3
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, ); }