Automattic\WooCommerce\EmailEditor\Engine
Settings_Controller::get_allowed_iframe_style_handles
Get the allowed iframe style handles.
Method of the class: Settings_Controller{}
Hooks from the method
Returns
Array.
Usage
// private - for code of main (parent) class only $result = $this->get_allowed_iframe_style_handles();
Settings_Controller::get_allowed_iframe_style_handles() Settings Controller::get allowed iframe style handles code WC 10.4.3
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 );
}