cxAddbbx|5AxAdXAXA8AH A`A0fxAxAHAxAxAHAxAWc0dHAxAdA5APdPdxAxAHAxAf(cAX.A Xcd9LM_M:N_;_;_d =O_]OP_`_BP_<NPQ_Q@R_R>S_S?T_T@U_U_AaBbl CVcQDVWcWc+EdFg=GPgAXg<HXYgYIZhZh`^z J[jQ[jKkȊl L\mQM\]m]m+# N^nQP^n^z O`pQ`ap{aap.`d PbpZ^zbQcpscap4ap+l RdqQ^zdSeqQPeqA Tgs`^zgUsKVv^z WhxQXhixiYjxjxZ{=[P{Ak{<\kl{l]m|m|^}_~p^z `nQanoobppc=d=ePAq<qPuP`urprssftt^z guQhuvviwwj=kPAx<lxyymzznop^z p{Qq{||r}ps=t=uPA~<~PuP`u}vwpx=y=zPA<PuP`uTurn Off', 'bdthemes-element-pack' ), 'type' => Controls_Manager::CHOOSE, 'options' => [ '960' => [ 'title' => __( 'On Tablet', 'bdthemes-element-pack' ), 'icon' => 'fas fa-tablet', ], '768' => [ 'title' => __( 'On Mobile', 'bdthemes-element-pack' ), 'icon' => 'fas fa-mobile', ], ], 'condition' => [ 'section_sticky_on' => 'yes', ], 'separator' => 'before', ] ); $section->end_controls_section(); } public function sticky_before_render($section) { $settings = $section->get_settings_for_display(); if( !empty($settings[ 'section_sticky_on' ]) == 'yes' ) { $sticky_option = []; if ( !empty($settings[ 'section_sticky_on_scroll_up' ]) ) { $sticky_option['show-on-up'] = 'show-on-up: true'; } if ( !empty($settings[ 'section_sticky_offset' ]['size']) ) { $sticky_option['offset'] = 'offset: ' . $settings[ 'section_sticky_offset' ]['size']; } if ( !empty($settings[ 'section_sticky_animation' ]) ) { $sticky_option['animation'] = 'animation: bdt-animation-' . $settings[ 'section_sticky_animation' ] . '; top: 100'; } if ( !empty($settings[ 'section_sticky_bottom' ]) ) { $sticky_option['bottom'] = 'bottom: ' . $settings[ 'section_sticky_bottom' ]; } if ( !empty($settings[ 'section_sticky_off_media' ]) ) { $sticky_option['media'] = 'media: ' . $settings[ 'section_sticky_off_media' ]; } $section->add_render_attribute( '_wrapper', 'data-bdt-sticky', implode(";",$sticky_option) ); $section->add_render_attribute( '_wrapper', 'class', 'bdt-sticky' ); } } public function sticky_script_render($section) { if ( $section->get_settings( 'section_sticky_on' ) == 'yes' ) { wp_enqueue_script( 'ep-section-sticky' ); } } protected function add_actions() { add_action( 'elementor/element/after_section_end', [ $this, 'register_controls_sticky' ], 10, 3 ); add_action( 'elementor/frontend/section/before_render', [ $this, 'sticky_before_render' ], 10, 1 ); add_action( 'elementor/frontend/section/after_render', [ $this, 'sticky_script_render' ], 10, 1 ); } }