Sid Gifari File Manager
🏠 Root
/
home
/
ailwtbdh
/
public_html
/
wp-content
/
plugins
/
profundcore
/
addons
/
widgets
/
Editing: section-title.php
<?php namespace Elementor; if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly class profund_Elementor_Widget_Section_Title extends Widget_Base { public function get_name() { return 'section-title-addons'; } public function get_title() { return __( 'Section Title', 'profundcore' ); } public function get_icon() { return 'profund-icon eicon-type-tool'; } public function get_categories() { return [ 'profund-addons' ]; } protected function register_controls() { $this->start_controls_section( 'start_top_heading_section', [ 'label' => __( 'Top Heading','profundcore' ), 'tab' => Controls_Manager::TAB_CONTENT, ] ); $this->add_control( 'top_heading', [ 'label' => __( 'Top Heading', 'profundcore' ), 'type' => Controls_Manager::TEXT, 'dynamic' => [ 'active' => true, ], 'default' => __( 'Top Heading Here.', 'profundcore' ), 'placeholder' => __( 'Type your top title here', 'profundcore' ), ] ); $this->add_control( 'top_heading_tag', [ 'label' => __( 'HTML Tag', 'profundcore' ), 'type' => Controls_Manager::SELECT, 'options' => profund_html_tag_lists(), 'default' => 'h5', ] ); $this->add_control( 'top_heading_bar', [ 'label' => __( 'Bar Position', 'profundcore' ), 'type' => Controls_Manager::SELECT, 'options' => [ 'none' => __( 'none','profundcore' ), 'top' => __( 'Top','profundcore' ), 'bottom' => __( 'Bottom','profundcore' ), 'left' => __( 'Left','profundcore' ), 'right' => __( 'Right','profundcore' ), 'left-right' => __( 'Left And Right','profundcore' ), ], 'default' => 'none', ] ); $this->add_responsive_control( 'top_heading_align', [ 'label' => __( 'Alignment', 'elementor' ), 'type' => Controls_Manager::CHOOSE, 'options' => [ 'left' => [ 'title' => __( 'Left', 'elementor' ), 'icon' => 'eicon-text-align-left', ], 'center' => [ 'title' => __( 'Center', 'elementor' ), 'icon' => 'eicon-text-align-center', ], 'right' => [ 'title' => __( 'Right', 'elementor' ), 'icon' => 'eicon-text-align-right', ], 'justify' => [ 'title' => __( 'Justified', 'elementor' ), 'icon' => 'eicon-text-align-justify', ], ], 'default' => 'left', 'selectors' => [ '{{WRAPPER}} .top-heading' => 'text-align: {{VALUE}};', ], ] ); $this->end_controls_section(); $this->start_controls_section( 'start_main_heading_section', [ 'label' => __( 'Main Heading','profundcore' ), 'tab' => Controls_Manager::TAB_CONTENT, ] ); $this->add_control( 'main_heading', [ 'label' => __( 'Main Heading', 'profundcore' ), 'type' => Controls_Manager::WYSIWYG, 'dynamic' => [ 'active' => true, ], 'default' => __( 'Main Heading Here.', 'profundcore' ), 'placeholder' => __( 'Type your main title here', 'profundcore' ), ] ); $this->add_control( 'main_heading_tag', [ 'label' => __( 'HTML Tag', 'profundcore' ), 'type' => Controls_Manager::SELECT, 'options' => profund_html_tag_lists(), 'default' => 'h2', ] ); $this->add_responsive_control( 'main_heading_align', [ 'label' => __( 'Alignment', 'elementor' ), 'type' => Controls_Manager::CHOOSE, 'options' => [ 'left' => [ 'title' => __( 'Left', 'elementor' ), 'icon' => 'eicon-text-align-left', ], 'center' => [ 'title' => __( 'Center', 'elementor' ), 'icon' => 'eicon-text-align-center', ], 'right' => [ 'title' => __( 'Right', 'elementor' ), 'icon' => 'eicon-text-align-right', ], 'justify' => [ 'title' => __( 'Justified', 'elementor' ), 'icon' => 'eicon-text-align-justify', ], ], 'default' => '', 'selectors' => [ '{{WRAPPER}} .main-heading' => 'text-align: {{VALUE}};', ], ] ); $this->end_controls_section(); $this->start_controls_section( 'start_sub_heading_section', [ 'label' => __( 'Sub Heading','profundcore' ), 'tab' => Controls_Manager::TAB_CONTENT, ] ); $this->add_control( 'sub_heading', [ 'label' => __( 'Sub Heading', 'profundcore' ), 'type' => Controls_Manager::TEXT, 'dynamic' => [ 'active' => true, ], 'default' => __( 'Sub Heading Here.', 'profundcore' ), 'placeholder' => __( 'Type your sub title here', 'profundcore' ), ] ); $this->add_control( 'sub_heading_tag', [ 'label' => __( 'HTML Tag', 'profundcore' ), 'type' => Controls_Manager::SELECT, 'options' => profund_html_tag_lists(), 'default' => 'p', ] ); $this->add_responsive_control( 'sub_heading_align', [ 'label' => __( 'Alignment', 'elementor' ), 'type' => Controls_Manager::CHOOSE, 'options' => [ 'left' => [ 'title' => __( 'Left', 'elementor' ), 'icon' => 'eicon-text-align-left', ], 'center' => [ 'title' => __( 'Center', 'elementor' ), 'icon' => 'eicon-text-align-center', ], 'right' => [ 'title' => __( 'Right', 'elementor' ), 'icon' => 'eicon-text-align-right', ], 'justify' => [ 'title' => __( 'Justified', 'elementor' ), 'icon' => 'eicon-text-align-justify', ], ], 'default' => '', 'selectors' => [ '{{WRAPPER}} .sub-heading' => 'text-align: {{VALUE}};', ], ] ); $this->end_controls_section(); $this->start_controls_section( 'start_desc_section', [ 'label' => __( 'Description','profundcore' ), 'tab' => Controls_Manager::TAB_CONTENT, ] ); $this->add_control( 'desc_content', [ 'label' => __( 'Description', 'profundcore' ), 'type' => Controls_Manager::WYSIWYG, 'dynamic' => [ 'active' => true, ], 'default' => __( 'Description Content Here.', 'profundcore' ), 'placeholder' => __( 'Type your description here', 'profundcore' ), ] ); $this->add_control( 'desc_tag', [ 'label' => __( 'HTML Tag', 'profundcore' ), 'type' => Controls_Manager::SELECT, 'options' => profund_html_tag_lists(), 'default' => 'div', ] ); $this->add_responsive_control( 'desc_align', [ 'label' => __( 'Alignment', 'elementor' ), 'type' => Controls_Manager::CHOOSE, 'options' => [ 'left' => [ 'title' => __( 'Left', 'elementor' ), 'icon' => 'eicon-text-align-left', ], 'center' => [ 'title' => __( 'Center', 'elementor' ), 'icon' => 'eicon-text-align-center', ], 'right' => [ 'title' => __( 'Right', 'elementor' ), 'icon' => 'eicon-text-align-right', ], 'justify' => [ 'title' => __( 'Justified', 'elementor' ), 'icon' => 'eicon-text-align-justify', ], ], 'default' => '', 'selectors' => [ '{{WRAPPER}} .desc' => 'text-align: {{VALUE}};', ], ] ); $this->end_controls_section(); $this->start_controls_section( 'start_icon_section', [ 'label' => __( 'Icon','profundcore' ), 'tab' => Controls_Manager::TAB_CONTENT, ] ); $this->add_control( 'icon_content', [ 'label' => __( 'Icon', 'profundcore' ), 'type' => Controls_Manager::ICON, 'dynamic' => [ 'active' => true, ], 'placeholder' => __( 'Type your description here', 'profundcore' ), ] ); $this->add_responsive_control( 'icon_align', [ 'label' => __( 'Alignment', 'elementor' ), 'type' => Controls_Manager::CHOOSE, 'options' => [ 'left' => [ 'title' => __( 'Left', 'elementor' ), 'icon' => 'eicon-text-align-left', ], 'center' => [ 'title' => __( 'Center', 'elementor' ), 'icon' => 'eicon-text-align-center', ], 'right' => [ 'title' => __( 'Right', 'elementor' ), 'icon' => 'eicon-text-align-right', ], 'justify' => [ 'title' => __( 'Justified', 'elementor' ), 'icon' => 'eicon-text-align-justify', ], ], 'default' => '', 'selectors' => [ '{{WRAPPER}} .icon' => 'text-align: {{VALUE}};', ], ] ); $this->add_control( 'icon_color', [ 'label' => __( 'Color', 'profundcore' ), 'type' => Controls_Manager::COLOR, 'frontend_available' => true, 'selectors' => [ '{{WRAPPER}} .icon' => 'color: {{VALUE}};', ], ] ); $this->add_responsive_control( 'icon_size', [ 'label' => __( 'Size', 'profundcore' ), 'type' => Controls_Manager::SLIDER, 'range' => [ 'px' => [ 'min' => 0, 'max' => 500, 'step' => 1, ], '%' => [ 'min' => 0, 'max' => 100, ], ], 'size_units' => [ 'px', '%' ], 'selectors' => [ '{{WRAPPER}} .icon' => 'font-size: {{SIZE}}{{UNIT}};', ], ] ); $this->add_responsive_control( 'icon_opacity', [ 'label' => __( 'Opacity (%)', 'profundcore' ), 'type' => Controls_Manager::SLIDER, 'default' => [ 'size' => 1, ], 'range' => [ 'px' => [ 'max' => 1, 'step' => 0.01, ], ], 'selectors' => [ '{{WRAPPER}} .icon' => 'opacity: {{SIZE}}', ], ] ); $this->add_responsive_control( 'icon_width', [ 'label' => __( 'Icon Width', 'profundcore' ), 'type' => Controls_Manager::SLIDER, 'range' => [ 'px' => [ 'min' => 0, 'max' => 1000, 'step' => 1, ], '%' => [ 'min' => 0, 'max' => 100, ], 'vw' => [ 'min' => 0, 'max' => 100, ] ], 'size_units' => [ 'px', '%', 'vw' ], 'selectors' => [ '{{WRAPPER}} .icon' => 'width: {{SIZE}}{{UNIT}};', ], ] ); $this->add_responsive_control( 'icon_height', [ 'label' => __( 'Icon Height', 'profundcore' ), 'type' => Controls_Manager::SLIDER, 'range' => [ 'px' => [ 'min' => 0, 'max' => 1000, 'step' => 1, ], '%' => [ 'min' => 0, 'max' => 100, ], 'vh' => [ 'min' => 0, 'max' => 100, ] ], 'size_units' => [ 'px', '%', 'vh' ], 'selectors' => [ '{{WRAPPER}} .icon' => 'height: {{SIZE}}{{UNIT}};', ], ] ); $this->add_responsive_control( 'icon_hr_offset', [ 'label' => __( 'Horizontal Offset', 'profundcore' ), 'type' => Controls_Manager::SLIDER, 'size_units' => [ 'px', '%', 'vw' ], 'range' => [ 'px' => [ 'min' => -2000, 'max' => 2000, ], '%' => [ 'min' => -100, 'max' => 100, ], 'vw' => [ 'min' => -100, 'max' => 100, ] ], 'selectors' => [ '{{WRAPPER}} .icon' => 'position:absolute;left: {{SIZE}}{{UNIT}};', ], ] ); $this->add_responsive_control( 'icon_vr_offset', [ 'label' => __( 'Vertical Offset', 'profundcore' ), 'type' => Controls_Manager::SLIDER, 'size_units' => [ 'px', '%', 'vh' ], 'range' => [ 'px' => [ 'min' => -2000, 'max' => 2000, ], '%' => [ 'min' => -100, 'max' => 100, ], 'vh' => [ 'min' => -100, 'max' => 100, ] ], 'selectors' => [ '{{WRAPPER}} .icon' => 'position:absolute;top: {{SIZE}}{{UNIT}};', ], ] ); $this->add_responsive_control( 'icon_z_index', [ 'label' => __( 'Z Index', 'profundcore' ), 'type' => Controls_Manager::NUMBER, 'min' => -100, 'max' => 100, 'step' => 1, 'default' => -1, 'selectors' => [ '{{WRAPPER}} .icon' => 'z-index: {{SIZE}};', ], ] ); $this->end_controls_section(); // Text Box Style tab section $this->start_controls_section( 'start_top_heading_style', [ 'label' => __( 'Top Heading', 'profundcore' ), 'tab' => Controls_Manager::TAB_STYLE, ] ); $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'top_heading_typo', 'selector' => '{{WRAPPER}} .profund-section-heading .top-heading', ] ); $this->add_control( 'top_heading_color', [ 'label' => __( 'Color', 'profundcore' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .profund-section-heading .top-heading' => 'color: {{VALUE}};', ], ] ); $this->add_responsive_control( 'top_heading_margin', [ 'label' => __( 'Margin', 'profundcore' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%', 'em' ], 'default' => [ 'top' => '0', 'right' => '0', 'bottom' => '15', 'left' => '0', 'isLinked' => true ], 'selectors' => [ '{{WRAPPER}} .profund-section-heading .top-heading' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], 'separator' =>'before', ] ); $this->add_responsive_control( 'top_heading_padding', [ 'label' => __( 'Padding', 'profundcore' ), 'type' => Controls_Manager::DIMENSIONS, 'default' => [ 'top' => '0', 'right' => '0', 'bottom' => '0', 'left' => '0', 'isLinked' => true ], 'size_units' => [ 'px', '%', 'em' ], 'selectors' => [ '{{WRAPPER}} .profund-section-heading .top-heading' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], 'separator' =>'before', ] ); $this->add_control( 'top_heading_bar_color', [ 'label' => __( 'Bar Color', 'profundcore' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .profund-section-heading .top-heading:before,{{WRAPPER}} .profund-section-heading .top-heading:after' => 'background-color: {{VALUE}};', ], ] ); $this->end_controls_section(); // Text Box Style tab section $this->start_controls_section( 'start_main_heading_style', [ 'label' => __( 'Main Heading', 'profundcore' ), 'tab' => Controls_Manager::TAB_STYLE, ] ); $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'main_heading_typo', 'selector' => '{{WRAPPER}} .profund-section-heading .main-heading', ] ); $this->add_control( 'main_heading_color', [ 'label' => __( 'Color', 'profundcore' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .profund-section-heading .main-heading' => 'color: {{VALUE}};', ], ] ); $this->add_responsive_control( 'main_heading_margin', [ 'label' => __( 'Margin', 'profundcore' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%', 'em' ], 'default' => [ 'top' => '0', 'right' => '0', 'bottom' => '15', 'left' => '0', 'isLinked' => true ], 'selectors' => [ '{{WRAPPER}} .profund-section-heading .main-heading' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], 'separator' =>'before', ] ); $this->add_responsive_control( 'main_heading_padding', [ 'label' => __( 'Padding', 'profundcore' ), 'type' => Controls_Manager::DIMENSIONS, 'default' => [ 'top' => '0', 'right' => '0', 'bottom' => '0', 'left' => '0', 'isLinked' => true ], 'size_units' => [ 'px', '%', 'em' ], 'selectors' => [ '{{WRAPPER}} .profund-section-heading .main-heading' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], 'separator' =>'before', ] ); $this->end_controls_section(); // Text Box Style tab section $this->start_controls_section( 'start_sub_heading_style', [ 'label' => __( 'Sub Heading', 'profundcore' ), 'tab' => Controls_Manager::TAB_STYLE, ] ); $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'sub_heading_typo', 'selector' => '{{WRAPPER}} .profund-section-heading .sub-heading', ] ); $this->add_control( 'sub_heading_color', [ 'label' => __( 'Color', 'profundcore' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .profund-section-heading .sub-heading' => 'color: {{VALUE}};', ], ] ); $this->add_responsive_control( 'sub_heading_margin', [ 'label' => __( 'Margin', 'profundcore' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%', 'em' ], 'default' => [ 'top' => '0', 'right' => '0', 'bottom' => '15', 'left' => '0', 'isLinked' => true ], 'selectors' => [ '{{WRAPPER}} .profund-section-heading .sub-heading' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], 'separator' =>'before', ] ); $this->add_responsive_control( 'sub_heading_padding', [ 'label' => __( 'Padding', 'profundcore' ), 'type' => Controls_Manager::DIMENSIONS, 'default' => [ 'top' => '0', 'right' => '0', 'bottom' => '0', 'left' => '0', 'isLinked' => true ], 'size_units' => [ 'px', '%', 'em' ], 'selectors' => [ '{{WRAPPER}} .profund-section-heading .sub-heading' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], 'separator' =>'before', ] ); $this->add_responsive_control( 'sub_heading_opacity', [ 'label' => __( 'Opacity (%)', 'profundcore' ), 'type' => Controls_Manager::SLIDER, 'default' => [ 'size' => 1, ], 'range' => [ 'px' => [ 'max' => 1, 'step' => 0.01, ], ], 'selectors' => [ '{{WRAPPER}} .sub-heading' => 'opacity: {{SIZE}}', ], ] ); $this->add_responsive_control( 'sub_heading_width', [ 'label' => __( 'Width', 'profundcore' ), 'type' => Controls_Manager::SLIDER, 'range' => [ 'px' => [ 'min' => 0, 'max' => 1000, 'step' => 1, ], '%' => [ 'min' => 0, 'max' => 100, ], 'vw' => [ 'min' => 0, 'max' => 100, ] ], 'size_units' => [ 'px', '%', 'vw' ], 'selectors' => [ '{{WRAPPER}} .sub-heading' => 'width: {{SIZE}}{{UNIT}};', ], ] ); $this->add_responsive_control( 'sub_heading_height', [ 'label' => __( 'Height', 'profundcore' ), 'type' => Controls_Manager::SLIDER, 'range' => [ 'px' => [ 'min' => 0, 'max' => 1000, 'step' => 1, ], '%' => [ 'min' => 0, 'max' => 100, ], 'vh' => [ 'min' => 0, 'max' => 100, ] ], 'size_units' => [ 'px', '%', 'vh' ], 'selectors' => [ '{{WRAPPER}} .sub-heading' => 'height: {{SIZE}}{{UNIT}};', ], ] ); $this->add_responsive_control( 'sub_heading_hr_offset', [ 'label' => __( 'Horizontal Offset', 'profundcore' ), 'type' => Controls_Manager::SLIDER, 'size_units' => [ 'px', '%', 'vw' ], 'range' => [ 'px' => [ 'min' => -2000, 'max' => 2000, ], '%' => [ 'min' => -100, 'max' => 100, ], 'vw' => [ 'min' => -100, 'max' => 100, ] ], 'selectors' => [ '{{WRAPPER}} .sub-heading' => 'position:absolute;left: {{SIZE}}{{UNIT}};', ], ] ); $this->add_responsive_control( 'sub_heading_vr_offset', [ 'label' => __( 'Vertical Offset', 'profundcore' ), 'type' => Controls_Manager::SLIDER, 'size_units' => [ 'px', '%', 'vh' ], 'range' => [ 'px' => [ 'min' => -2000, 'max' => 2000, ], '%' => [ 'min' => -100, 'max' => 100, ], 'vh' => [ 'min' => -100, 'max' => 100, ] ], 'selectors' => [ '{{WRAPPER}} .sub-heading' => 'position:absolute;top: {{SIZE}}{{UNIT}};', ], ] ); $this->add_responsive_control( 'sub_heading_z_index', [ 'label' => __( 'Z Index', 'profundcore' ), 'type' => Controls_Manager::NUMBER, 'min' => -100, 'max' => 100, 'step' => 1, 'default' => -1, 'selectors' => [ '{{WRAPPER}} .sub-heading' => 'z-index: {{SIZE}};', ], ] ); $this->end_controls_section(); // Text Box Style tab section $this->start_controls_section( 'start_desc_style', [ 'label' => __( 'Description', 'profundcore' ), 'tab' => Controls_Manager::TAB_STYLE, ] ); $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'desc_typo', 'selector' => '{{WRAPPER}} .profund-section-heading .desc', ] ); $this->add_control( 'desc_color', [ 'label' => __( 'Color', 'profundcore' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .profund-section-heading .desc' => 'color: {{VALUE}};', ], ] ); $this->add_responsive_control( 'desc_margin', [ 'label' => __( 'Margin', 'profundcore' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%', 'em' ], 'default' => [ 'top' => '0', 'right' => '0', 'bottom' => '0', 'left' => '0', 'isLinked' => true ], 'selectors' => [ '{{WRAPPER}} .profund-section-heading .desc' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], 'separator' =>'before', ] ); $this->add_responsive_control( 'desc_padding', [ 'label' => __( 'Padding', 'profundcore' ), 'type' => Controls_Manager::DIMENSIONS, 'default' => [ 'top' => '0', 'right' => '0', 'bottom' => '0', 'left' => '0', 'isLinked' => true ], 'size_units' => [ 'px', '%', 'em' ], 'selectors' => [ '{{WRAPPER}} .profund-section-heading .desc' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], 'separator' =>'before', ] ); $this->end_controls_section(); } protected function render( $instance = [] ) { $html_output = ''; $settings = $this->get_settings_for_display(); /*== Value-Check ==*/ if ( empty( $settings['top_heading'] ) and empty( $settings['main_heading'] ) and empty( $settings['sub_heading'] ) ) { return; } /*== Set-Area-Class ==*/ $this->add_render_attribute( 'section_area_attr', 'class', 'profund-section-heading' ); /*== Cullect-Top-Heading-Content ==*/ $this->add_render_attribute( 'top_heading', 'class', [ 'top-heading', 'heading-bar-'.$settings['top_heading_bar'] ] ); $this->add_inline_editing_attributes( 'top_heading' ); $top_heading = wp_kses_post($settings['top_heading']); /*== Cullect-Main-Heading-Content ==*/ $this->add_render_attribute( 'main_heading', 'class', [ 'main-heading' ] ); $this->add_inline_editing_attributes( 'main_heading' ); $main_heading = wp_kses_post($settings['main_heading']); $main_heading = str_replace('<p', '<span', $main_heading ); $main_heading = str_replace('</p>', '</span>', $main_heading ); /*== Cullect-Sub-Heading-Content ==*/ $this->add_render_attribute( 'sub_heading', 'class', ['sub-heading' ] ); $this->add_inline_editing_attributes( 'sub_heading' ); $sub_heading = wp_kses_post($settings['sub_heading']); /*== Cullect-Description-Content ==*/ $this->add_render_attribute( 'desc_content', 'class', [ 'desc' ] ); $this->add_inline_editing_attributes( 'desc_content' ); $desc = wp_kses_post($settings['desc_content']); /*== Cullect-Icon-Content ==*/ $icon = esc_attr($settings['icon_content']); /*== HTML-Output ==*/ $html_output .= '<div '.$this->get_render_attribute_string( 'section_area_attr' ).' >'; /*== Start-Tag ==*/ if( $top_heading != '' ){ $html_output .= sprintf( '<%1$s %2$s>%3$s</%1$s>', $settings['top_heading_tag'], $this->get_render_attribute_string( 'top_heading' ), $top_heading ); } if( $main_heading != '' ){ $html_output .= sprintf( '<%1$s %2$s>%3$s</%1$s>', $settings['main_heading_tag'], $this->get_render_attribute_string( 'main_heading' ), $main_heading ); } if( $sub_heading != '' ){ $html_output .= sprintf( '<%1$s %2$s>%3$s</%1$s>', $settings['sub_heading_tag'], $this->get_render_attribute_string( 'sub_heading' ), $sub_heading ); } if( $desc != '' ){ $html_output .= sprintf( '<%1$s %2$s>%3$s</%1$s>', $settings['desc_tag'], $this->get_render_attribute_string( 'desc_content' ), $desc ); } if( $icon != '' ){ $html_output .= sprintf( '<div class="icon" ><i class="%1$s" ></i></div>', $icon ); } $html_output .= '</div>'; /*== End-Tag ==*/ /*== Display-Output ==*/ echo $html_output; } protected function content_template() { ?> <# var html_output = ''; view.addRenderAttribute( 'section_area_attr', 'class', [ 'profund-section-heading' ] ); view.addRenderAttribute( 'top_heading', 'class', [ 'top-heading', 'heading-bar-' + settings.top_heading_bar] ); view.addInlineEditingAttributes( 'top_heading' ); var top_heading = settings.top_heading; view.addRenderAttribute( 'main_heading', 'class', [ 'main-heading' ] ); view.addInlineEditingAttributes( 'main_heading' ); var main_heading = settings.main_heading; view.addRenderAttribute( 'sub_heading', 'class', [ 'sub-heading' ] ); view.addInlineEditingAttributes( 'sub_heading' ); var sub_heading = settings.sub_heading; view.addRenderAttribute( 'desc_content', 'class', [ 'desc' ] ); view.addInlineEditingAttributes( 'desc_content' ); var desc_content = settings.desc_content; var icon_content = settings.icon_content; html_output += '<div '+view.getRenderAttributeString( 'section_area_attr' )+' >'; if( top_heading != '' ){ html_output += '<' + settings.top_heading_tag + ' ' + view.getRenderAttributeString( 'top_heading' ) + '>' + top_heading + '</' + settings.top_heading_tag + '>'; } if( main_heading != '' ){ html_output += '<' + settings.main_heading_tag + ' ' + view.getRenderAttributeString( 'main_heading' ) + '>' + main_heading + '</' + settings.main_heading_tag + '>'; } if( sub_heading != '' ){ html_output += '<' + settings.sub_heading_tag + ' ' + view.getRenderAttributeString( 'sub_heading' ) + '>' + sub_heading + '</' + settings.sub_heading_tag + '>'; } if( desc_content != '' ){ html_output += '<' + settings.desc_tag + ' ' + view.getRenderAttributeString( 'desc_content' ) + '>' + desc_content + '</' + settings.desc_tag + '>'; } if( icon_content != '' ){ html_output += '<div class="icon" ><i class="' + icon_content + '"></i></div>'; } html_output += '</div>'; print( html_output ); #> <?php } } Plugin::instance()->widgets_manager->register_widget_type( new profund_Elementor_Widget_Section_Title );
Save
Cancel