Automattic\WooCommerce\Admin\Features
Onboarding::get_allowed_themes() public WC 1.0
Gets an array of themes that can be installed & activated via the onboarding wizard.
{} Это метод класса: Onboarding{}
Хуки из метода
Возвращает
Массив
. Ничего.
Использование
$result = Onboarding::get_allowed_themes();
Код Onboarding::get_allowed_themes() Onboarding::get allowed themes WC 5.2.2
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 );
}