register_general_content_controls(); } /** * Register site tagline General Controls. * * @since 1.3.0 * @access protected */ protected function register_general_content_controls() { $this->start_controls_section( 'section_general_fields', [ 'label' => __( 'Style', 'header-footer-elementor' ), ] ); $this->add_control( 'before', [ 'label' => __( 'Before Title Text', 'header-footer-elementor' ), 'type' => Controls_Manager::TEXTAREA, 'rows' => '1', 'dynamic' => [ 'active' => true, ], ] ); $this->add_control( 'after', [ 'label' => __( 'After Title Text', 'header-footer-elementor' ), 'type' => Controls_Manager::TEXTAREA, 'rows' => '1', 'dynamic' => [ 'active' => true, ], ] ); $this->add_control( 'icon', [ 'label' => __( 'Icon', 'header-footer-elementor' ), 'type' => Controls_Manager::ICONS, 'label_block' => 'true', ] ); $this->add_control( 'icon_indent', [ 'label' => __( 'Icon Spacing', 'header-footer-elementor' ), 'type' => Controls_Manager::SLIDER, 'range' => [ 'px' => [ 'max' => 50, ], ], 'condition' => [ 'icon[value]!' => '', ], 'selectors' => [ '{{WRAPPER}} .hfe-icon' => 'margin-right: {{SIZE}}{{UNIT}};', ], ] ); $this->add_responsive_control( 'heading_text_align', [ 'label' => __( 'Alignment', 'header-footer-elementor' ), 'type' => Controls_Manager::CHOOSE, 'options' => [ 'left' => [ 'title' => __( 'Left', 'header-footer-elementor' ), 'icon' => 'fa fa-align-left', ], 'center' => [ 'title' => __( 'Center', 'header-footer-elementor' ), 'icon' => 'fa fa-align-center', ], 'right' => [ 'title' => __( 'Right', 'header-footer-elementor' ), 'icon' => 'fa fa-align-right', ], 'justify' => [ 'title' => __( 'Justify', 'header-footer-elementor' ), 'icon' => 'fa fa-align-justify', ], ], 'selectors' => [ '{{WRAPPER}} .hfe-site-tagline' => 'text-align: {{VALUE}};', ], 'frontend_available' => true, ] ); $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'tagline_typography', 'global' => [ 'default' => Global_Typography::TYPOGRAPHY_SECONDARY, ], 'selector' => '{{WRAPPER}} .hfe-site-tagline', ] ); $this->add_control( 'tagline_color', [ 'label' => __( 'Color', 'header-footer-elementor' ), 'type' => Controls_Manager::COLOR, 'global' => [ 'default' => Global_Colors::COLOR_SECONDARY, ], 'selectors' => [ '{{WRAPPER}} .hfe-site-tagline' => 'color: {{VALUE}};', '{{WRAPPER}} .hfe-icon i' => 'color: {{VALUE}};', '{{WRAPPER}} .hfe-icon svg' => 'fill: {{VALUE}};', ], ] ); $this->add_control( 'icon_color', [ 'label' => __( 'Icon Color', 'header-footer-elementor' ), 'type' => Controls_Manager::COLOR, 'global' => [ 'default' => Global_Colors::COLOR_PRIMARY, ], 'condition' => [ 'icon[value]!' => '', ], 'default' => '', 'selectors' => [ '{{WRAPPER}} .hfe-icon i' => 'color: {{VALUE}};', '{{WRAPPER}} .hfe-icon svg' => 'fill: {{VALUE}};', ], ] ); $this->add_control( 'icons_hover_color', [ 'label' => __( 'Icon Hover Color', 'header-footer-elementor' ), 'type' => Controls_Manager::COLOR, 'condition' => [ 'icon[value]!' => '', ], 'default' => '', 'selectors' => [ '{{WRAPPER}} .hfe-icon:hover i' => 'color: {{VALUE}};', '{{WRAPPER}} .hfe-icon:hover svg' => 'fill: {{VALUE}};', ], ] ); $this->end_controls_section(); } /** * Render site tagline output on the frontend. * * Written in PHP and used to generate the final HTML. * * @since 1.3.0 * @access protected */ protected function render() { $settings = $this->get_settings_for_display(); ?>
'true' ] ); ?>
<# var iconHTML = elementor.helpers.renderIcon( view, settings.icon, { 'aria-hidden': true }, 'i' , 'object' ); #>
<# if( '' != settings.icon.value ){ #> {{{iconHTML.value}}} <# } #> <#if ( '' != settings.before ){#> {{{ settings.before}}} <#}#> <# if ( '' != settings.after ){#> {{{ settings.after }}} <#}#>