Automattic\WooCommerce\EmailEditor\Engine
Settings_Controller::get_allowed_iframe_style_handles
Get the allowed iframe style handles.
Метод класса: Settings_Controller{}
Хуки из метода
Возвращает
array.
Использование
// private - только в коде основоного (родительского) класса $result = $this->get_allowed_iframe_style_handles();
Код Settings_Controller::get_allowed_iframe_style_handles() Settings Controller::get allowed iframe style handles WC 11.2.2
private function get_allowed_iframe_style_handles() {
// Core style handles.
$allowed_iframe_style_handles = array(
'wp-components-css',
'wp-reset-editor-styles-css',
'wp-block-library-css',
'wp-block-editor-content-css',
'wp-edit-blocks-css',
);
foreach ( \WP_Block_Type_Registry::get_instance()->get_all_registered() as $block ) {
if ( ! isset( $block->supports['email'] ) || ! $block->supports['email'] ) {
continue;
}
foreach ( $block->style_handles as $handle ) {
$allowed_iframe_style_handles[] = $handle . '-css';
}
foreach ( $block->editor_style_handles as $handle ) {
$allowed_iframe_style_handles[] = $handle . '-css';
}
}
return apply_filters( 'woocommerce_email_editor_allowed_iframe_style_handles', $allowed_iframe_style_handles );
}