wizard
1 year ago
class-addons-template-util.php
1 year ago
class-allowed-template-html-util.php
1 year ago
class-base-exception.php
1 year ago
class-cache-constants.php
1 year ago
class-cache-exception.php
1 year ago
class-key-exception.php
1 year ago
class-keytypes.php
1 year ago
class-option-exception.php
1 year ago
class-quiet-skin.php
1 year ago
class-request-exception.php
1 year ago
class-script-translations.php
1 year ago
class-settings-exception.php
1 year ago
class-theme-installer-exception.php
1 year ago
class-theme-installer.php
1 year ago
class-allowed-template-html-util.php
28 lines
| 1 | <?php |
| 2 | |
| 3 | namespace SuperbAddons\Data\Utils; |
| 4 | |
| 5 | defined('ABSPATH') || exit(); |
| 6 | |
| 7 | class AllowedTemplateHTMLUtil |
| 8 | { |
| 9 | public static function enable_safe_styles() |
| 10 | { |
| 11 | add_filter("safe_style_css", array(__CLASS__, "_add_display_safe_style_css")); |
| 12 | } |
| 13 | |
| 14 | public static function disable_safe_styles() |
| 15 | { |
| 16 | remove_filter("safe_style_css", array(__CLASS__, "_add_display_safe_style_css")); |
| 17 | } |
| 18 | |
| 19 | public static function _add_display_safe_style_css($styles) |
| 20 | { |
| 21 | if (!is_array($styles)) { |
| 22 | $styles = []; |
| 23 | } |
| 24 | $styles[] = 'display'; |
| 25 | return $styles; |
| 26 | } |
| 27 | } |
| 28 |