'string', 'value' => '...' ] ), and they are * extended through the "elementor/atomic-widgets/*" filters. * * Every hook here is guarded, so on Elementor versions without atomic * elements this class does nothing. */ if ( ! defined( 'ABSPATH' ) ) exit; if ( ! class_exists( 'ACCE_Atomic_Support' ) ) { class ACCE_Atomic_Support { const PROP_DESKTOP = 'acce_css_desktop'; const PROP_TABLET = 'acce_css_tablet'; const PROP_MOBILE = 'acce_css_mobile'; const STRING_PROP_TYPE = '\\Elementor\\Modules\\AtomicWidgets\\PropTypes\\Primitives\\String_Prop_Type'; private $prop_class = null; private $done_docs = []; private $pending = []; public function __construct() { add_filter( 'elementor/atomic-widgets/props-schema', [ $this, 'add_props' ], 20 ); add_action( 'elementor/editor/after_enqueue_scripts', [ $this, 'enqueue_editor_script' ], 20 ); // Front-end delivery that does not depend on parse_css firing for atomic elements. add_action( 'wp_enqueue_scripts', [ $this, 'enqueue_frontend_css' ], 30 ); add_action( 'elementor/frontend/before_get_builder_content', [ $this, 'collect_builder_content_css' ], 10, 2 ); add_action( 'wp_footer', [ $this, 'print_pending_css' ], 5 ); add_action( 'elementor/editor/after_enqueue_styles', [ $this, 'enqueue_editor_styles' ], 20 ); } /* ------------------------------------------------------------------ */ /* Helpers */ /* ------------------------------------------------------------------ */ public static function get_breakpoints() { $defaults = [ 'tablet' => 1024, 'mobile' => 767 ]; $breakpoints = apply_filters( 'ACCE_custom_css_breakpoints', $defaults ); if ( ! is_array( $breakpoints ) ) { $breakpoints = $defaults; } return [ 'tablet' => (int) ( $breakpoints['tablet'] ?? $defaults['tablet'] ), 'mobile' => (int) ( $breakpoints['mobile'] ?? $defaults['mobile'] ), ]; } /** * Strips anything that could break out of a