start_controls_section( 'advanced_fancy_text_global_before_content_controls', [ 'label' => __( 'Text Before Effect', 'advamentor' ), 'tab' => Controls_Manager::TAB_CONTENT ] ); // Registering Advanced Fancy Text Global Before Text Control $this->add_control( 'advanced_fancy_text_global_before_text_control', [ 'label' => __( 'Before Text', 'advamentor' ), 'type' => Controls_Manager::TEXT, 'default' => __( 'Advamentor is ', 'advamentor' ), 'placeholder' => __( 'Type your text here', 'advamentor' ), ] ); // Registering Advanced Fancy Text Global Before Typography Control $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'advanced_fancy_text_global_before_typography_controls', 'label' => __( 'Before Text Typography', 'advamentor' ), 'scheme' => Scheme_Typography::TYPOGRAPHY_1, 'selector' => '{{WRAPPER}} .advanced-fancy-text-before-content', ] ); $this->end_controls_section(); // Registering Advanced Fancy Text Global Effect Content Controls $this->start_controls_section( 'advanced_fancy_text_global_effect_content_controls', [ 'label' => __( 'Enter Effect Text(s)', 'advamentor' ), 'tab' => Controls_Manager::TAB_CONTENT ] ); $repeater = new Repeater(); $repeater->add_control( 'advanced_fancy_text_global_effect_text_control', [ 'label' => __( 'Add Text with Effect', 'advamentor' ), 'type' => Controls_Manager::TEXT, 'label_block' => true, ] ); $this->add_control( 'advanced_fancy_text_global_effect_text_repeater', [ 'label' => __( 'Effect Text(s) List', 'advamentor' ), 'type' => Controls_Manager::REPEATER, 'fields' => $repeater->get_controls(), 'default' => [ [ 'advanced_fancy_text_global_effect_text_control' => __( 'Increadibly', 'advamentor' ) ], [ 'advanced_fancy_text_global_effect_text_control' => __( 'Beautifully', 'advamentor' ) ], ], 'title_field' => '{{{ advanced_fancy_text_global_effect_text_control }}}', ] ); $this->end_controls_section(); // Registering Advanced Fancy Text Global After Content Controls $this->start_controls_section( 'advanced_fancy_text_global_after_content_controls', [ 'label' => __( 'Text After Effect', 'advamentor' ), 'tab' => Controls_Manager::TAB_CONTENT ] ); // Registering Advanced Fancy Text Global After Text Control $this->add_control( 'advanced_fancy_text_global_after_text_control', [ 'label' => __( 'After Text', 'advamentor' ), 'type' => Controls_Manager::TEXT, 'default' => __( ' and awesome.', 'advamentor' ), 'placeholder' => __( 'Type your text here', 'advamentor' ), ] ); // Registering Advanced Fancy Text Global After Typography Control $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'advanced_fancy_text_global_after_typography_controls', 'label' => __( 'After Text Typography', 'advamentor' ), 'scheme' => Scheme_Typography::TYPOGRAPHY_1, 'selector' => '{{WRAPPER}} .advanced-fancy-text-after-content', ] ); $this->end_controls_section(); // Registering Advanced Fancy Text Global Effect Style Controls $this->start_controls_section( 'advanced_fancy_text_global_effect_style_controls', [ 'label' => __( 'Select Text Effect', 'advamentor' ), 'tab' => Controls_Manager::TAB_STYLE ] ); // Registering Advanced Fancy Text Global Effect Preset Control $this->add_control( 'advanced_fancy_text_global_effect_preset_control', [ 'label' => __( 'Select Effect', 'advamentor' ), 'type' => Controls_Manager::SELECT, 'default' => 'typeit', 'options' => [ 'typeit' => __( 'Cursor', 'advamentor' ), 'typer' => __( 'Typewriter', 'advamentor' ) ], ] ); $this->end_controls_section(); } protected function render() { $settings = $this->get_settings_for_display(); $elementid = $this->get_id(); echo '