register_presets_control( 'Fancy_Heading', $this ); $this->register_headingtext_content_controls(); $this->register_effect_content_controls(); $this->register_general_content_controls(); $this->register_style_content_controls(); $this->register_helpful_information(); } /** * Register Fancy Heading Text Controls. * * @since 0.0.1 * @access protected */ protected function register_headingtext_content_controls() { $this->start_controls_section( 'section_general_field', array( 'label' => __( 'Heading Text', 'uael' ), ) ); $this->add_control( 'fancytext_prefix', array( 'label' => __( 'Before Text', 'uael' ), 'type' => Controls_Manager::TEXT, 'selector' => '{{WRAPPER}} .uael-fancy-text-prefix', 'dynamic' => array( 'active' => true, ), 'default' => __( 'I am', 'uael' ), ) ); $this->add_control( 'fancytext', array( 'label' => __( 'Fancy Text', 'uael' ), 'type' => Controls_Manager::TEXTAREA, 'placeholder' => __( 'Enter each word in a separate line', 'uael' ), 'dynamic' => array( 'active' => true, ), 'default' => "Creative\nAmazing\nPassionate", ) ); $this->add_control( 'fancytext_suffix', array( 'label' => __( 'After Text', 'uael' ), 'type' => Controls_Manager::TEXT, 'selector' => '{{WRAPPER}} .uael-fancy-text-suffix', 'dynamic' => array( 'active' => true, ), 'default' => __( 'Designer', 'uael' ), ) ); $this->end_controls_section(); } /** * Register Fancy Heading Effect Controls. * * @since 0.0.1 * @access protected */ protected function register_effect_content_controls() { $this->start_controls_section( 'section_effect_field', array( 'label' => __( 'Effect', 'uael' ), ) ); $this->add_control( 'fancytext_effect_type', array( 'label' => __( 'Select Effect', 'uael' ), 'type' => Controls_Manager::SELECT, 'options' => array( 'type' => __( 'Type', 'uael' ), 'slide' => __( 'Slide Up', 'uael' ), 'slide_down' => __( 'Slide Down', 'uael' ), 'rotate' => __( 'Rotate', 'uael' ), 'clip' => __( 'Clip', 'uael' ), 'push' => __( 'Push', 'uael' ), 'drop_in' => __( 'Drop In', 'uael' ), ), 'default' => 'type', 'label_block' => false, ) ); $this->add_control( 'fancytext_type_loop', array( 'label' => __( 'Enable Loop', 'uael' ), 'type' => Controls_Manager::SWITCHER, 'label_on' => __( 'Yes', 'uael' ), 'label_off' => __( 'No', 'uael' ), 'return_value' => 'yes', 'default' => 'yes', 'condition' => array( 'fancytext_effect_type' => 'type', ), ) ); $this->add_control( 'fancytext_type_show_cursor', array( 'label' => __( 'Show Cursor', 'uael' ), 'type' => Controls_Manager::SWITCHER, 'label_on' => __( 'Yes', 'uael' ), 'label_off' => __( 'No', 'uael' ), 'return_value' => 'yes', 'default' => 'no', 'condition' => array( 'fancytext_effect_type' => array( 'type', 'clip' ), ), ) ); $this->add_control( 'clip_line_color', array( 'label' => __( 'Line Color', 'uael' ), 'type' => Controls_Manager::COLOR, 'global' => array( 'default' => Global_Colors::COLOR_ACCENT, ), 'selectors' => array( '{{WRAPPER}} .uael-clip-cursor-yes .uael-fancy-text-clip .uael-slide-main_ul::after' => 'background-color: {{VALUE}};', ), 'condition' => array( 'fancytext_effect_type' => 'clip', 'fancytext_type_show_cursor' => 'yes', ), ) ); $this->add_control( 'fancytext_type_cursor_text', array( 'label' => __( 'Cursor Text', 'uael' ), 'type' => Controls_Manager::TEXT, 'selector' => '{{WRAPPER}}', 'default' => __( '|', 'uael' ), 'condition' => array( 'fancytext_effect_type' => 'type', 'fancytext_type_show_cursor' => 'yes', ), 'selector' => '{{WRAPPER}} .typed-cursor', ) ); $this->add_control( 'fancytext_type_cursor_blink', array( 'label' => __( 'Cursor Blink Effect', 'uael' ), 'type' => Controls_Manager::SWITCHER, 'label_on' => __( 'Yes', 'uael' ), 'label_off' => __( 'No', 'uael' ), 'return_value' => 'yes', 'default' => 'yes', 'condition' => array( 'fancytext_effect_type' => 'type', 'fancytext_type_show_cursor' => 'yes', ), 'prefix_class' => 'uael-show-cursor-', ) ); $this->add_control( 'fancytext_type_fields', array( 'label' => __( 'Advanced Settings', 'uael' ), 'type' => Controls_Manager::SWITCHER, 'label_on' => __( 'Yes', 'uael' ), 'label_off' => __( 'No', 'uael' ), 'return_value' => 'yes', 'default' => 'no', 'condition' => array( 'fancytext_effect_type' => 'type', ), ) ); $this->add_control( 'fancytext_slide_pause_hover', array( 'label' => __( 'Pause on Hover', 'uael' ), 'type' => Controls_Manager::SWITCHER, 'label_on' => __( 'Yes', 'uael' ), 'label_off' => __( 'No', 'uael' ), 'return_value' => 'yes', 'default' => 'yes', 'condition' => array( 'fancytext_effect_type' => 'slide', ), ) ); $this->add_control( 'fancytext_slide_anim_speed', array( 'label' => __( 'Animation Speed (ms)', 'uael' ), 'type' => Controls_Manager::SLIDER, 'size_units' => array( 'ms' ), 'range' => array( 'ms' => array( 'min' => 1, 'max' => 5000, ), ), 'default' => array( 'size' => '500', 'unit' => 'ms', ), 'label_block' => true, 'condition' => array( 'fancytext_effect_type' => 'slide', ), ) ); $this->add_control( 'fancytext_rotate_anim_speed', array( 'label' => __( 'Animation Speed (ms)', 'uael' ), 'type' => Controls_Manager::SLIDER, 'size_units' => array( 'ms' ), 'range' => array( 'ms' => array( 'min' => 1, 'max' => 5000, ), ), 'default' => array( 'size' => '2500', 'unit' => 'ms', ), 'label_block' => true, 'condition' => array( 'fancytext_effect_type!' => array( 'type', 'slide', 'clip' ), ), ) ); $this->add_control( 'fancytext_slide_pause_time', array( 'label' => __( 'Pause Time (ms)', 'uael' ), 'type' => Controls_Manager::SLIDER, 'size_units' => array( 'ms' ), 'range' => array( 'ms' => array( 'min' => 1, 'max' => 5000, ), ), 'default' => array( 'size' => '2000', 'unit' => 'ms', ), 'label_block' => true, 'condition' => array( 'fancytext_effect_type' => 'slide', ), ) ); $this->add_control( 'fancytext_clip_anim_speed', array( 'label' => __( 'Animation Speed (ms)', 'uael' ), 'type' => Controls_Manager::SLIDER, 'size_units' => array( 'ms' ), 'range' => array( 'ms' => array( 'min' => 1, 'max' => 5000, ), ), 'default' => array( 'size' => '600', 'unit' => 'ms', ), 'label_block' => true, 'condition' => array( 'fancytext_effect_type' => array( 'clip' ), ), ) ); $this->add_control( 'fancytext_clip_pause_time', array( 'label' => __( 'Pause Time (ms)', 'uael' ), 'type' => Controls_Manager::SLIDER, 'size_units' => array( 'ms' ), 'range' => array( 'ms' => array( 'min' => 1, 'max' => 5000, ), ), 'default' => array( 'size' => '1500', 'unit' => 'ms', ), 'label_block' => true, 'condition' => array( 'fancytext_effect_type' => 'clip', ), ) ); $this->add_control( 'fancytext_type_speed', array( 'label' => __( 'Typing Speed (ms)', 'uael' ), 'type' => Controls_Manager::SLIDER, 'size_units' => array( 'ms' ), 'range' => array( 'ms' => array( 'min' => 0, 'max' => 1000, ), ), 'default' => array( 'size' => '120', 'unit' => 'ms', ), 'label_block' => true, 'condition' => array( 'fancytext_effect_type' => 'type', 'fancytext_type_fields' => 'yes', ), ) ); $this->add_control( 'fancytext_type_backspeed', array( 'label' => __( 'Backspeed (ms)', 'uael' ), 'type' => Controls_Manager::SLIDER, 'size_units' => array( 'ms' ), 'range' => array( 'ms' => array( 'min' => 0, 'max' => 1000, ), ), 'default' => array( 'size' => '60', 'unit' => 'ms', ), 'label_block' => true, 'condition' => array( 'fancytext_effect_type' => 'type', 'fancytext_type_fields' => 'yes', ), ) ); $this->add_control( 'fancytext_type_start_delay', array( 'label' => __( 'Start Delay (ms)', 'uael' ), 'type' => Controls_Manager::SLIDER, 'size_units' => array( 'ms' ), 'range' => array( 'ms' => array( 'min' => 0, 'max' => 5000, ), ), 'default' => array( 'size' => '0', 'unit' => 'ms', ), 'label_block' => true, 'condition' => array( 'fancytext_effect_type' => 'type', 'fancytext_type_fields' => 'yes', ), ) ); $this->add_control( 'fancytext_type_back_delay', array( 'label' => __( 'Back Delay (ms)', 'uael' ), 'type' => Controls_Manager::SLIDER, 'size_units' => array( 'ms' ), 'range' => array( 'ms' => array( 'min' => 0, 'max' => 5000, ), ), 'default' => array( 'size' => '1200', 'unit' => 'ms', ), 'label_block' => true, 'condition' => array( 'fancytext_effect_type' => 'type', 'fancytext_type_fields' => 'yes', ), ) ); $this->end_controls_section(); } /** * Register Fancy Heading General Controls. * * @since 0.0.1 * @access protected */ protected function register_general_content_controls() { $this->start_controls_section( 'section_structure_field', array( 'label' => __( 'General', 'uael' ), 'tab' => Controls_Manager::TAB_STYLE, ) ); $this->add_control( 'fancytext_title_tag', array( 'label' => __( 'Title Tag', 'uael' ), 'type' => Controls_Manager::SELECT, 'options' => array( 'h1' => __( 'H1', 'uael' ), 'h2' => __( 'H2', 'uael' ), 'h3' => __( 'H3', 'uael' ), 'h4' => __( 'H4', 'uael' ), 'h5' => __( 'H5', 'uael' ), 'h6' => __( 'H6', 'uael' ), 'div' => __( 'div', 'uael' ), 'p' => __( 'p', 'uael' ), ), 'default' => 'h3', ) ); $this->add_responsive_control( 'fancytext_align', array( 'label' => __( 'Alignment', 'uael' ), 'type' => Controls_Manager::CHOOSE, 'options' => array( 'left' => array( 'title' => __( 'Left', 'uael' ), 'icon' => 'fa fa-align-left', ), 'center' => array( 'title' => __( 'Center', 'uael' ), 'icon' => 'fa fa-align-center', ), 'right' => array( 'title' => __( 'Right', 'uael' ), 'icon' => 'fa fa-align-right', ), ), 'default' => 'left', 'selectors' => array( '{{WRAPPER}} .uael-fancy-text-wrap ' => 'text-align: {{VALUE}};', ), 'frontend_available' => true, ) ); $this->add_control( 'fancytext_layout', array( 'label' => __( 'Layout', 'uael' ), 'type' => Controls_Manager::SWITCHER, 'label_on' => __( 'Stack', 'uael' ), 'label_off' => __( 'Inline', 'uael' ), 'return_value' => 'yes', 'default' => 'no', 'prefix_class' => 'uael-fancytext-stack-', ) ); $this->add_responsive_control( 'fancytext_space_prefix', array( 'label' => __( 'Before Spacing', 'uael' ), 'type' => Controls_Manager::SLIDER, 'size_units' => array( 'px' ), 'range' => array( 'px' => array( 'min' => 0, 'max' => 200, ), ), 'default' => array( 'size' => '0', 'unit' => 'px', ), 'selectors' => array( '{{WRAPPER}}.uael-fancytext-stack-yes .uael-fancy-stack ' => 'margin-top: {{SIZE}}{{UNIT}};', '{{WRAPPER}}.uael-fancytext-stack-yes .uael-fancy-stack .uael-fancy-heading.uael-fancy-text-main' => ' margin-left: 0px;', '{{WRAPPER}} .uael-fancy-text-main' => 'margin-left: {{SIZE}}{{UNIT}};', ), 'frontend_available' => true, ) ); $this->add_responsive_control( 'fancytext_space_suffix', array( 'label' => __( 'After Spacing', 'uael' ), 'type' => Controls_Manager::SLIDER, 'size_units' => array( 'px' ), 'range' => array( 'px' => array( 'min' => 0, 'max' => 200, ), ), 'default' => array( 'size' => '0', 'unit' => 'px', ), 'condition' => array( 'fancytext_suffix!' => '', ), 'selectors' => array( '{{WRAPPER}} .uael-fancy-text-main' => 'margin-right: {{SIZE}}{{UNIT}};', '{{WRAPPER}}.uael-fancytext-stack-yes .uael-fancy-stack ' => 'margin-bottom: {{SIZE}}{{UNIT}};', '{{WRAPPER}}.uael-fancytext-stack-yes .uael-fancy-stack .uael-fancy-heading.uael-fancy-text-main' => ' margin-right: 0px;', ), 'frontend_available' => true, ) ); $this->add_responsive_control( 'fancytext_min_height', array( 'label' => __( 'Minimum Height', 'uael' ), 'type' => Controls_Manager::SLIDER, 'size_units' => array( 'px' ), 'range' => array( 'px' => array( 'min' => 0, 'max' => 1000, ), ), 'selectors' => array( '{{WRAPPER}} .uael-fancy-text-wrap' => 'min-height: {{SIZE}}{{UNIT}};', ), 'condition' => array( 'fancytext_effect_type' => 'type', ), 'frontend_available' => true, ) ); $this->end_controls_section(); } /** * Register Fancy Heading Style Controls. * * @since 0.0.1 * @access protected */ protected function register_style_content_controls() { $this->start_controls_section( 'section_typography_field', array( 'label' => __( 'Style', 'uael' ), 'tab' => Controls_Manager::TAB_STYLE, ) ); $this->start_controls_tabs( 'tabs_fancytext' ); $this->start_controls_tab( 'tab_heading', array( 'label' => __( 'Heading Text', 'uael' ), ) ); $this->add_control( 'prefix_suffix_color', array( 'label' => __( 'Text Color', 'uael' ), 'type' => Controls_Manager::COLOR, 'global' => array( 'default' => Global_Colors::COLOR_PRIMARY, ), 'default' => '', 'selectors' => array( '{{WRAPPER}} .uael-fancy-heading' => 'color: {{VALUE}};', ), ) ); $this->add_group_control( Group_Control_Typography::get_type(), array( 'name' => 'prefix_suffix_typography', 'global' => array( 'default' => Global_Typography::TYPOGRAPHY_PRIMARY, ), 'selector' => '{{WRAPPER}} .uael-fancy-heading, {{WRAPPER}} .uael-fancy-heading .uael-slide_text', ) ); $this->add_control( 'text_adv_options', array( 'label' => __( 'Advanced', 'uael' ), 'type' => Controls_Manager::SWITCHER, 'label_on' => __( 'Yes', 'uael' ), 'label_off' => __( 'No', 'uael' ), 'return_value' => 'yes', 'default' => '', ) ); $this->add_group_control( Group_Control_Background::get_type(), array( 'name' => 'text_bg_color', 'label' => __( 'Background Color', 'uael' ), 'types' => array( 'classic', 'gradient' ), 'selector' => '{{WRAPPER}} .uael-fancy-heading', 'condition' => array( 'text_adv_options' => 'yes', ), ) ); $this->add_responsive_control( 'text_padding', array( 'label' => __( 'Padding', 'uael' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => array( 'px', '%' ), 'selectors' => array( '{{WRAPPER}} .uael-fancy-heading' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ), 'condition' => array( 'text_adv_options' => 'yes', ), 'frontend_available' => true, ) ); $this->add_group_control( Group_Control_Border::get_type(), array( 'name' => 'text_border', 'label' => __( 'Border', 'uael' ), 'placeholder' => '1px', 'default' => '1px', 'selector' => '{{WRAPPER}} .uael-fancy-heading', 'condition' => array( 'text_adv_options' => 'yes', ), ) ); $this->add_control( 'text_border_radius', array( 'label' => __( 'Border Radius', 'uael' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => array( 'px', '%' ), 'selectors' => array( '{{WRAPPER}} .uael-fancy-heading' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ), 'condition' => array( 'text_adv_options' => 'yes', ), ) ); $this->add_group_control( Group_Control_Text_Shadow::get_type(), array( 'name' => 'text_shadow', 'selector' => '{{WRAPPER}} .uael-fancy-heading', 'condition' => array( 'text_adv_options' => 'yes', ), ) ); $this->end_controls_tab(); $this->start_controls_tab( 'tab_fancy', array( 'label' => __( 'Fancy Text', 'uael' ), ) ); $this->add_control( 'fancytext_color', array( 'label' => __( 'Fancy Text Color', 'uael' ), 'type' => Controls_Manager::COLOR, 'global' => array( 'default' => Global_Colors::COLOR_SECONDARY, ), 'selectors' => array( '{{WRAPPER}} .uael-fancy-heading.uael-fancy-text-main' => 'color: {{VALUE}};', ), ) ); $this->add_group_control( Group_Control_Typography::get_type(), array( 'name' => 'fancytext_typography', 'global' => array( 'default' => Global_Typography::TYPOGRAPHY_PRIMARY, ), 'selector' => '{{WRAPPER}} .uael-fancy-heading.uael-fancy-text-main, {{WRAPPER}} .uael-fancy-heading.uael-fancy-text-main .uael-slide_text', ) ); $this->add_control( 'fancy_adv_options', array( 'label' => __( 'Advanced', 'uael' ), 'type' => Controls_Manager::SWITCHER, 'label_on' => __( 'Yes', 'uael' ), 'label_off' => __( 'No', 'uael' ), 'return_value' => 'yes', 'default' => '', ) ); $this->add_control( 'fancytext_bg_color', array( 'label' => __( 'Background Color', 'uael' ), 'type' => Controls_Manager::COLOR, 'selectors' => array( '{{WRAPPER}} .uael-fancy-heading.uael-fancy-text-main' => 'background-color: {{VALUE}};', ), 'condition' => array( 'fancy_adv_options' => 'yes', ), ) ); $this->add_group_control( Group_Control_Background::get_type(), array( 'name' => 'fancytext_bg_color', 'label' => __( 'Background Color', 'uael' ), 'types' => array( 'classic', 'gradient' ), 'selector' => '{{WRAPPER}} .uael-fancy-heading.uael-fancy-text-main', 'condition' => array( 'fancy_adv_options' => 'yes', ), ) ); $this->add_responsive_control( 'fancytext_padding', array( 'label' => __( 'Padding', 'uael' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => array( 'px', '%' ), 'selectors' => array( '{{WRAPPER}} .uael-fancy-heading.uael-fancy-text-main' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ), 'condition' => array( 'fancy_adv_options' => 'yes', ), 'frontend_available' => true, ) ); $this->add_group_control( Group_Control_Border::get_type(), array( 'name' => 'fancytext_border', 'label' => __( 'Border', 'uael' ), 'placeholder' => '1px', 'default' => '1px', 'selector' => '{{WRAPPER}} .uael-fancy-heading.uael-fancy-text-main', 'condition' => array( 'fancy_adv_options' => 'yes', ), ) ); $this->add_control( 'fancytext_border_radius', array( 'label' => __( 'Border Radius', 'uael' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => array( 'px', '%' ), 'selectors' => array( '{{WRAPPER}} .uael-fancy-heading.uael-fancy-text-main' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ), 'condition' => array( 'fancy_adv_options' => 'yes', ), ) ); $this->add_group_control( Group_Control_Text_Shadow::get_type(), array( 'name' => 'fancytext_shadow', 'selector' => '{{WRAPPER}} .uael-fancy-heading.uael-fancy-text-main', 'condition' => array( 'fancy_adv_options' => 'yes', ), ) ); $this->end_controls_tab(); $this->end_controls_tabs(); $this->end_controls_section(); } /** * Helpful Information. * * @since 1.1.0 * @access protected */ protected function register_helpful_information() { $help_link_2 = UAEL_DOMAIN . 'docs/fancy-heading-widget/?utm_source=uael-pro-dashboard&utm_medium=uael-menu-page&utm_campaign=uael-pro-plugin'; if ( parent::is_internal_links() ) { $this->start_controls_section( 'section_helpful_info', array( 'label' => __( 'Helpful Information', 'uael' ), ) ); $this->add_control( 'help_doc_1', array( 'type' => Controls_Manager::RAW_HTML, /* translators: %1$s doc link */ 'raw' => sprintf( __( '%1$s Getting started video » %2$s', 'uael' ), '', '' ), 'content_classes' => 'uael-editor-doc', ) ); $this->add_control( 'help_doc_2', array( 'type' => Controls_Manager::RAW_HTML, /* translators: %1$s doc link */ 'raw' => sprintf( __( '%1$s Getting started article » %2$s', 'uael' ), '', '' ), 'content_classes' => 'uael-editor-doc', ) ); $this->end_controls_section(); } } /** * Get Fancy Text data. * * Written in PHP. * * @since 1.3.1 * @access protected */ protected function get_fancytext_data() { $settings = $this->get_settings_for_display(); $fancy_text = $this->get_settings_for_display( 'fancytext' ); $fancy_text = preg_replace( '/[\n\r]/', '|', $fancy_text ); $data_strings = explode( '|', $fancy_text ); return $data_strings; } /** * Render Fancy Text output on the frontend. * * Written in PHP and used to generate the final HTML. * * @since 0.0.1 * @access protected */ protected function render() { $html = ''; $settings = $this->get_settings(); $dynamic_settings = $this->get_settings_for_display(); // Get Data Attributes. $effect_type = $settings['fancytext_effect_type']; $data_strings = $this->get_fancytext_data(); $fancy_data = wp_json_encode( $data_strings ); if ( 'type' === $settings['fancytext_effect_type'] ) { $type_speed = ( '' !== $settings['fancytext_type_speed']['size'] ) ? $settings['fancytext_type_speed']['size'] : 120; $back_speed = ( '' !== $settings['fancytext_type_backspeed']['size'] ) ? $settings['fancytext_type_backspeed']['size'] : 60; $start_delay = ( '' !== $settings['fancytext_type_start_delay']['size'] ) ? $settings['fancytext_type_start_delay']['size'] : 0; $back_delay = ( '' !== $settings['fancytext_type_back_delay']['size'] ) ? $settings['fancytext_type_back_delay']['size'] : 1200; $loop = ( 'yes' === $settings['fancytext_type_loop'] ) ? 'true' : 'false'; if ( 'yes' === $settings['fancytext_type_show_cursor'] ) { $show_cursor = 'true'; $cursor_char = ( '' !== $settings['fancytext_type_cursor_text'] ) ? $settings['fancytext_type_cursor_text'] : '|'; } else { $show_cursor = 'false'; $cursor_char = ''; } $this->add_render_attribute( 'fancy-text', array( 'data-type-speed' => $type_speed, 'data-animation' => $effect_type, 'data-back-speed' => $back_speed, 'data-start-delay' => $start_delay, 'data-back-delay' => $back_delay, 'data-loop' => $loop, 'data-show-cursor' => $show_cursor, 'data-cursor-char' => $cursor_char, 'data-strings' => $fancy_data, ) ); } elseif ( 'slide' === $settings['fancytext_effect_type'] ) { $speed = ( '' !== $settings['fancytext_slide_anim_speed']['size'] ) ? $settings['fancytext_slide_anim_speed']['size'] : 35; $pause = ( '' !== $settings['fancytext_slide_pause_time']['size'] ) ? $settings['fancytext_slide_pause_time']['size'] : 3000; $mousepause = ( 'yes' === $settings['fancytext_slide_pause_hover'] ) ? true : false; $this->add_render_attribute( 'fancy-text', array( 'data-animation' => $effect_type, 'data-speed' => $speed, 'data-pause' => $pause, 'data-mousepause' => $mousepause, 'data-strings' => $fancy_data, ) ); } else { $speed = ( '' !== $settings['fancytext_rotate_anim_speed']['size'] ) ? $settings['fancytext_rotate_anim_speed']['size'] : 2500; $this->add_render_attribute( 'fancy-text', array( 'data-animation' => $effect_type, 'data-speed' => $speed, ) ); if ( 'clip' === $settings['fancytext_effect_type'] ) { $clip_speed = ( '' !== $settings['fancytext_clip_anim_speed']['size'] ) ? $settings['fancytext_clip_anim_speed']['size'] : 600; $pause_time = ( '' !== $settings['fancytext_clip_pause_time']['size'] ) ? $settings['fancytext_clip_pause_time']['size'] : 1500; $this->add_render_attribute( 'fancy-text', array( 'data-clip_speed' => $clip_speed, 'data-pause_time' => $pause_time, ) ); } } $node_id = $this->get_id(); $cursor_class = ( 'yes' === $settings['fancytext_type_show_cursor'] ) ? 'uael-clip-cursor-yes' : ''; ?>