qGUP?09qGUغ6po,qGUPPBd qGUp<~pGU`ppGU`BqGU/09qGUP po,qGU`PBd qGU<qGU4qGU +:pGU DLqGUPt&qGU(;LqGUPtd qGU<6-qGU`2I qGU<qGU>09qGUP0pd qGU<fqGUqGU+:qGU@=d qGU<fqGUqGU +:pGU0H DLqGU0Pt&qGU P;LqGU Ptd qGU0<6-qGU0`2I qGU<qGU >:qGU`X=?6qGUPAP qGUPfqGUP`qGU`@+pGUIpGU6`RqGUxp09qGUɪ6pd qGU<6-qGUP2o,qGUP`Bo,qGU`pBd qGU<qGU>09qGUP0po,qGUPPBd qGU<fqGUqGU +:pGUDLqGUPt&qGU;LqGUPtd qGU<6-qGU`2I qGU<qGU>:qGUP=P qGUqGU@+npGU>09qGUgGpI qGU<npGU>?A?A?A?An?An?A?A>A>A ?Aa?Aa?Aa?An?An?Ah?A>A>A?A`7A?A@U6(?A@?A@?A?A?A ?A ?An?An?A?A>A>AH?Ax7A?A?A@@`<6HHp6@6HH66H6H6&qGU;d qGU`<~pGUP`pGUPqGU+&qGU@;d qGU<qGU+&qGU;d qGU<2qGU8qGU*&qGU;d qGU<2qGUpGUP09qGUP@ pd qGU<fqGUqGU+&qGU0;o,qGUPPBI qGU<GBGUO^pGUY~qGUp sfqGU 0BqGU00/pGU @PqGU@PQqGUP`qGU`04 => Controls_Manager::RAW_HTML, 'content_classes' => 'elementor-control-field-description', 'condition' => [ 'sticky!' => '', ], ] ); // Add `Stay In Column` only to the following types: $types = [ Element_Section::class, Widget_Base::class, ]; // TODO: Remove when Container is the default. if ( Plugin::elementor()->experiments->is_feature_active( 'container' ) ) { $types[] = \Elementor\Includes\Elements\Container::class; } if ( $this->is_instance_of( $element, $types ) ) { $conditions = [ 'sticky!' => '', ]; // Target only inner sections. // Checking for `$element->get_data( 'isInner' )` in both editor & frontend causes it to work properly on the frontend but // break on the editor, because the inner section is created in JS and not rendered in PHP. // So this is a hack to force the editor to show the `sticky_parent` control, and still make it work properly on the frontend. if ( $element instanceof Element_Section && Plugin::elementor()->editor->is_edit_mode() ) { $conditions['isInner'] = true; } $element->add_control( 'sticky_parent', [ 'label' => esc_html__( 'Stay In Column', 'elementor-pro' ), 'type' => Controls_Manager::SWITCHER, 'condition' => $conditions, 'render_type' => 'none', 'frontend_available' => true, ] ); } $element->add_control( 'sticky_divider', [ 'type' => Controls_Manager::DIVIDER, ] ); } private function get_asset_conditions_data() { return [ 'styles' => [ [ 'name' => 'e-sticky', 'conditions' => [ 'terms' => [ [ 'name' => 'sticky', 'operator' => '!==', 'value' => '', ], ], ], ], ], 'scripts' => [ [ 'name' => 'e-sticky', 'conditions' => [ 'terms' => [ [ 'name' => 'sticky', 'operator' => '!==', 'value' => '', ], ], ], ], ], ]; } private function add_actions() { add_action( 'elementor/element/section/section_effects/after_section_start', [ $this, 'register_controls' ] ); add_action( 'elementor/element/container/section_effects/after_section_start', [ $this, 'register_controls' ] ); add_action( 'elementor/element/common/section_effects/after_section_start', [ $this, 'register_controls' ] ); add_action( 'elementor/element/common-optimized/section_effects/after_section_start', [ $this, 'register_controls' ] ); } }