Automattic\WooCommerce\Internal\Admin\Onboarding
OnboardingThemes::get_allowed_themes()
Gets an array of themes that can be installed & activated via the onboarding wizard.
Метод класса: OnboardingThemes{}
Хуки из метода
Возвращает
Массив
.
Использование
$result = OnboardingThemes::get_allowed_themes();
Код OnboardingThemes::get_allowed_themes() OnboardingThemes::get allowed themes WC 8.7.0
public static function get_allowed_themes() { $allowed_themes = array(); $themes = self::get_themes(); foreach ( $themes as $theme ) { $price = preg_replace( '/&#?[a-z0-9]+;/i', '', $theme['price'] ); if ( $theme['is_installed'] || '0.00' === $price ) { $allowed_themes[] = $theme['slug']; } } return apply_filters( 'woocommerce_admin_onboarding_themes_whitelist', $allowed_themes ); }