🔐 Sid Gifari File Manager Pro
v8.0.5 | 2026-06-14 13:42:22 | PHP 8.1.34
📂
/ (Root)
/
home
/
therahul
/
ramailobhela.com
/
wp-content
/
themes
/
nighty
/
elementor
/
widgets
📍 /home/therahul/ramailobhela.com/wp-content/themes/nighty/elementor/widgets
🔄 Refresh
✏️
Editing: heading.php
Writable
<?php use Elementor\Widget_Base; use Elementor\Controls_Manager; use Elementor\Group_Control_Typography; use Elementor\Utils; use Elementor\Group_Control_Border; if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly class Nighty_Elementor_Heading extends Widget_Base { public function get_name() { return 'nighty_elementor_heading'; } public function get_title() { return esc_html__( 'Ova Heading', 'nighty' ); } public function get_icon() { return 'eicon-heading'; } public function get_categories() { return [ 'nighty' ]; } public function get_script_depends() { return [ '' ]; } // Add Your Controll In This Function protected function register_controls() { $this->start_controls_section( 'section_content', [ 'label' => esc_html__( 'Content', 'nighty' ), ] ); $this->add_control( 'template', [ 'label' => esc_html__( 'Template', 'nighty' ), 'type' => Controls_Manager::SELECT, 'default' => 'template1', 'options' => [ 'template1' => esc_html__('Template 1', 'nighty'), 'template2' => esc_html__('Template 2', 'nighty'), 'template3' => esc_html__('Template 3', 'nighty'), 'template4' => esc_html__('Template 4', 'nighty'), 'template5' => esc_html__('Template 5', 'nighty'), ] ] ); $this->add_control( 'prefix', [ 'label' => esc_html__( 'Prefix', 'nighty' ), 'type' => \Elementor\Controls_Manager::TEXT, 'default' => esc_html__( '*', 'nighty' ), 'placeholder' => esc_html__( 'Type your prefix here', 'nighty' ), ] ); $this->add_control( 'sub_title', [ 'label' => esc_html__( 'Sub Title', 'nighty' ), 'type' => \Elementor\Controls_Manager::TEXT, 'default' => esc_html__( 'Upcoming Event Schedule', 'nighty' ), 'placeholder' => esc_html__( 'Type your sub title here', 'nighty' ), ] ); $this->add_control( 'title', [ 'label' => esc_html__( 'Title', 'nighty' ), 'type' => \Elementor\Controls_Manager::TEXTAREA, 'default' => esc_html__( 'We Enjoy Nightlife Varriation Dance Solutions.', 'nighty' ), 'placeholder' => esc_html__( 'Type your title here', 'nighty' ), ] ); $this->add_control( 'show_background_text', [ 'label' => esc_html__( 'Show Background Text', 'nighty' ), 'type' => \Elementor\Controls_Manager::SWITCHER, 'label_on' => esc_html__( 'Show', 'nighty' ), 'label_off' => esc_html__( 'Hide', 'nighty' ), 'return_value' => 'yes', 'default' => 'yes', 'condition' => [ 'template' => 'template5', ], ] ); $this->add_control( 'background_text', [ 'label' => esc_html__( 'Background Text', 'nighty' ), 'type' => \Elementor\Controls_Manager::TEXTAREA, 'default' => esc_html__( 'Providing Services', 'nighty' ), 'placeholder' => esc_html__( 'Type your title text background here', 'nighty' ), 'condition' => [ 'show_background_text' => 'yes', 'template' => 'template5', ], ] ); $this->add_control( 'title_feature_image', [ 'label' => esc_html__( 'Feature Image', 'nighty' ), 'type' => \Elementor\Controls_Manager::MEDIA, 'default' => [ 'url' => \Elementor\Utils::get_placeholder_image_src(), ], 'condition' => [ 'show_image' => 'yes', 'show_shape_underline' => 'yes', 'template' => 'template1', ], ] ); $this->add_control( 'link', [ 'label' => esc_html__( 'Link', 'nighty' ), 'type' => \Elementor\Controls_Manager::URL, 'placeholder' => esc_html__( 'https://your-link.com', 'nighty' ), 'options' => [ 'url', 'is_external', 'nofollow' ], 'default' => [ 'url' => '', 'is_external' => false, 'nofollow' => false, ], ] ); $this->add_control( 'html_tag', [ 'label' => esc_html__( 'HTML Tag', 'nighty' ), 'type' => \Elementor\Controls_Manager::SELECT, 'default' => 'h2', 'options' => [ 'h1' => esc_html__( 'H1', 'nighty' ), 'h2' => esc_html__( 'H2', 'nighty' ), 'h3' => esc_html__( 'H3', 'nighty' ), 'h4' => esc_html__( 'H4', 'nighty' ), 'h5' => esc_html__( 'H5', 'nighty' ), 'h6' => esc_html__( 'H6', 'nighty' ), 'div' => esc_html__( 'div', 'nighty' ), 'span' => esc_html__( 'span', 'nighty' ), 'p' => esc_html__( 'p', 'nighty' ), ], ] ); $this->add_control( 'description', [ 'label' => esc_html__( 'Description', 'nighty' ), 'type' => \Elementor\Controls_Manager::TEXTAREA, 'placeholder' => esc_html__( 'Type your description here', 'nighty' ), ] ); $this->add_responsive_control( 'alignment', [ 'label' => esc_html__( 'Alignment', 'nighty' ), 'type' => \Elementor\Controls_Manager::CHOOSE, 'options' => [ 'left' => [ 'title' => esc_html__( 'Left', 'nighty' ), 'icon' => 'eicon-text-align-left', ], 'center' => [ 'title' => esc_html__( 'Center', 'nighty' ), 'icon' => 'eicon-text-align-center', ], 'right' => [ 'title' => esc_html__( 'Right', 'nighty' ), 'icon' => 'eicon-text-align-right', ], ], 'toggle' => true, 'selectors' => [ '{{WRAPPER}} .ova-heading' => 'text-align: {{VALUE}};', ], 'condition' => [ 'template!' => 'template3', ], ] ); $this->add_control( 'show_author', [ 'label' => esc_html__( 'Show Author', 'nighty' ), 'type' => \Elementor\Controls_Manager::SWITCHER, 'label_on' => esc_html__( 'Show', 'nighty' ), 'label_off' => esc_html__( 'Hide', 'nighty' ), 'return_value' => 'yes', 'default' => 'no', 'condition' => [ 'template' => 'template1', ], ], ); $this->add_control( 'author_prefix', [ 'label' => esc_html__( 'Prefix', 'nighty' ), 'type' => \Elementor\Controls_Manager::TEXT, 'default' => esc_html__( '*', 'nighty' ), 'placeholder' => esc_html__( 'Type author prefix here', 'nighty' ), 'condition' => [ 'template' => 'template1', 'show_author' => 'yes', ], ] ); $this->add_control( 'author', [ 'label' => esc_html__( 'Author', 'nighty' ), 'type' => \Elementor\Controls_Manager::TEXT, 'default' => esc_html__( 'Ceo & Founder - Bellal Dhar', 'nighty' ), 'placeholder' => esc_html__( 'Type your title here', 'nighty' ), 'condition' => [ 'template' => 'template1', 'show_author' => 'yes', ], ] ); $this->add_control( 'show_button_booking', [ 'label' => esc_html__( 'Show Button Booking', 'nighty' ), 'type' => \Elementor\Controls_Manager::SWITCHER, 'label_on' => esc_html__( 'Show', 'nighty' ), 'label_off' => esc_html__( 'Hide', 'nighty' ), 'return_value' => 'yes', 'default' => 'yes', 'condition' => [ 'template' => 'template3', ], ], ); $this->add_control( 'text_booking', [ 'label' => esc_html__( 'Text', 'nighty' ), 'type' => \Elementor\Controls_Manager::TEXT, 'default' => esc_html__( 'Booking Today', 'nighty' ), 'placeholder' => esc_html__( 'Type text here', 'nighty' ), 'condition' => [ 'template' => 'template3', 'show_button_booking' => 'yes', ], ] ); $this->add_control( 'link_booking', [ 'label' => esc_html__( 'Link', 'nighty' ), 'type' => \Elementor\Controls_Manager::URL, 'placeholder' => esc_html__( 'https://your-link.com', 'nighty' ), 'options' => [ 'url', 'is_external', 'nofollow' ], 'default' => [ 'url' => '#', 'is_external' => true, 'nofollow' => false, ], 'condition' => [ 'template' => 'template3', 'show_button_booking' => 'yes', ], ] ); $this->add_control( 'icon_booking', [ 'label' => esc_html__( 'Icon', 'nighty' ), 'type' => \Elementor\Controls_Manager::ICONS, 'default' => [ 'value' => 'flaticon flaticon-up-right-arrow', 'library' => 'flaticon', ], 'condition' => [ 'template' => 'template3', 'show_button_booking' => 'yes', ], ] ); $this->end_controls_section(); //SECTION TAB STYLE SUB TITLE $this->start_controls_section( 'section_sub_title', [ 'label' => esc_html__( 'Sub Title', 'nighty' ), 'tab' => Controls_Manager::TAB_STYLE, ] ); $this->add_responsive_control( 'sub_title_padding', [ 'label' => esc_html__( 'Padding', 'nighty' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', 'em', '%' ], 'selectors' => [ '{{WRAPPER}} .ova-heading .sub-title-wrapper' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); $this->add_responsive_control( 'sub_title_margin', [ 'label' => esc_html__( 'Margin', 'nighty' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', 'em', '%' ], 'selectors' => [ '{{WRAPPER}} .ova-heading .sub-title-wrapper' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); $this->add_control( 'show_underline', [ 'label' => esc_html__( 'Show UnderLine', 'nighty' ), 'type' => \Elementor\Controls_Manager::SWITCHER, 'label_on' => esc_html__( 'Show', 'nighty' ), 'label_off' => esc_html__( 'Hide', 'nighty' ), 'return_value' => 'yes', 'default' => 'yes', ], ); $this->add_control( 'sub_title_prefix_heading', [ 'label' => esc_html__( 'Prefix', 'nighty' ), 'type' => \Elementor\Controls_Manager::HEADING, 'separator' => 'before', ] ); $this->add_responsive_control( 'sub_title_prefix_size', [ 'label' => esc_html__( 'Width', 'nighty' ), 'type' => \Elementor\Controls_Manager::SLIDER, 'size_units' => [ 'px', '%', 'em', 'rem'], 'range' => [ 'px' => [ 'min' => 0, 'max' => 100, 'step' => 1, ], '%' => [ 'min' => 0, 'max' => 100, ], ], 'selectors' => [ '{{WRAPPER}} .ova-heading .sub-title-wrapper .prefix' => 'font-size: {{SIZE}}{{UNIT}};', ], ] ); $this->add_control( 'sub_title_prefix_color', [ 'label' => esc_html__( 'Color', 'nighty' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .ova-heading .sub-title-wrapper .prefix' => 'color : {{VALUE}};' ], ] ); $this->add_responsive_control( 'sub_title_prefix_margin', [ 'label' => esc_html__( 'Margin', 'nighty' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', 'em', '%' ], 'selectors' => [ '{{WRAPPER}} .ova-heading .sub-title-wrapper .prefix' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); $this->add_control( 'sub_title_text_heading', [ 'label' => esc_html__( 'Text', 'nighty' ), 'type' => \Elementor\Controls_Manager::HEADING, 'separator' => 'before', ] ); $this->add_group_control( \Elementor\Group_Control_Typography::get_type(), [ 'name' => 'sub_title_text_typography', 'label' => esc_html__( 'Typography', 'nighty' ), 'selector' => '{{WRAPPER}} .ova-heading .sub-title-wrapper .sub-title', ] ); $this->add_control( 'sub_title_text_color', [ 'label' => esc_html__( 'Color', 'nighty' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .ova-heading .sub-title-wrapper .sub-title' => 'color : {{VALUE}};' ], ] ); $this->end_controls_section(); //END SECTION TAB STYLE SUB TITLE //SECTION TAB STYLE TITLE $this->start_controls_section( 'section_title_style', [ 'label' => esc_html__( 'Title', 'nighty' ), 'tab' => Controls_Manager::TAB_STYLE, ] ); $this->add_group_control( \Elementor\Group_Control_Typography::get_type(), [ 'name' => 'content_typography_title', 'label' => esc_html__( 'Typography', 'nighty' ), 'selector' => '{{WRAPPER}} .ova-heading .title', ] ); $this->add_control( 'color_title', [ 'label' => esc_html__( 'Color', 'nighty' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .ova-heading .title, {{WRAPPER}} .ova-heading .title a' => 'color : {{VALUE}};', ], ] ); $this->add_control( 'color_title_hover', [ 'label' => esc_html__( 'Color Hover', 'nighty' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .ova-heading .title:hover, {{WRAPPER}} .ova-heading .title:hover a' => 'color : {{VALUE}};' ], ] ); $this->add_responsive_control( 'margin_title', [ 'label' => esc_html__( 'Margin', 'nighty' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', 'em', '%' ], 'selectors' => [ '{{WRAPPER}} .ova-heading .title ' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); $this->add_control( 'special_text_custom', [ 'label' => esc_html__( 'Special Text Custom ', 'nighty' ), 'type' => \Elementor\Controls_Manager::SWITCHER, 'label_on' => esc_html__( 'Show', 'nighty' ), 'label_off' => esc_html__( 'Hide', 'nighty' ), 'return_value' => 'yes', 'default' => 'yes', 'separator' => 'before', ] ); $this->add_control( 'show_shape_underline', [ 'label' => esc_html__( 'Show Shape Underline', 'nighty' ), 'type' => \Elementor\Controls_Manager::SWITCHER, 'label_on' => esc_html__( 'Show', 'nighty' ), 'label_off' => esc_html__( 'Hide', 'nighty' ), 'return_value' => 'yes', 'default' => 'yes', 'condition' => [ 'template' => 'template1', 'special_text_custom' => 'yes', ], ] ); $this->add_control( 'word_position', [ 'label' => esc_html__( 'Special Text Position', 'nighty' ), 'type' => \Elementor\Controls_Manager::NUMBER, 'min' => 0, 'max' => 20, 'step' => 1, 'default' => 2, 'description' => esc_html__( '( 0 is first word )', 'nighty' ), 'condition' => [ 'special_text_custom' => 'yes', ], ] ); $this->add_control( 'special_text_color', [ 'label' => esc_html__( 'Text Color', 'nighty' ), 'type' => \Elementor\Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .ova-heading .title .word' => 'color: {{VALUE}}', ], 'condition' => [ 'special_text_custom' => 'yes', ], ] ); $this->add_control( 'special_text_opacity', [ 'label' => esc_html__( 'Opacity', 'nighty' ), 'type' => \Elementor\Controls_Manager::SLIDER, 'size_units' => [ 'px'], 'range' => [ 'px' => [ 'min' => 0, 'max' => 1, 'step' => 0.01, ], ], 'selectors' => [ '{{WRAPPER}} .ova-heading .title .word' => 'opacity: {{SIZE}};', ], 'condition' => [ 'special_text_custom' => 'yes', ], ] ); $this->add_control( 'special_text_stroke', [ 'label' => esc_html__( 'Special Text Stroke ', 'nighty' ), 'type' => \Elementor\Controls_Manager::SWITCHER, 'label_on' => esc_html__( 'Show', 'nighty' ), 'label_off' => esc_html__( 'Hide', 'nighty' ), 'return_value' => 'yes', 'default' => 'no', 'condition' => [ 'special_text_custom' => 'yes', ], ] ); $this->add_control( 'special_text_stroke_color', [ 'label' => esc_html__( 'Stroke Color', 'nighty' ), 'type' => \Elementor\Controls_Manager::SELECT, 'default' => 'white', 'options' => [ 'white' => esc_html__( 'White', 'nighty' ), 'black' => esc_html__( 'Black', 'nighty' ), ], 'condition' => [ 'special_text_stroke' => 'yes', ], ] ); $this->add_control( 'show_image', [ 'label' => esc_html__( 'Show Image', 'nighty' ), 'type' => \Elementor\Controls_Manager::SWITCHER, 'label_on' => esc_html__( 'Show', 'nighty' ), 'label_off' => esc_html__( 'Hide', 'nighty' ), 'return_value' => 'yes', 'default' => 'yes', 'separator' => 'before', 'condition' => [ 'show_shape_underline' => 'yes', 'template' => 'template1', ], ] ); $this->add_control( 'image_width', [ 'label' => esc_html__( 'Image Width', 'nighty' ), 'type' => \Elementor\Controls_Manager::SLIDER, 'size_units' => [ 'px', '%', 'em', 'rem' ], 'range' => [ 'px' => [ 'min' => 0, 'max' => 300, 'step' => 1, ], '%' => [ 'min' => 0, 'max' => 100, ], ], 'selectors' => [ '{{WRAPPER}} .ova-heading .title img' => 'width: {{SIZE}}{{UNIT}};min-width: {{SIZE}}{{UNIT}};', ], 'condition' => [ 'show_image' => 'yes', 'show_shape_underline' => 'yes', 'template' => 'template1', ], ] ); $this->add_control( 'image_height', [ 'label' => esc_html__( 'Image Height', 'nighty' ), 'type' => \Elementor\Controls_Manager::SLIDER, 'size_units' => [ 'px', '%', 'em', 'rem' ], 'range' => [ 'px' => [ 'min' => 0, 'max' => 200, 'step' => 1, ], '%' => [ 'min' => 0, 'max' => 100, ], ], 'selectors' => [ '{{WRAPPER}} .ova-heading .title img' => 'height: {{SIZE}}{{UNIT}};', ], 'condition' => [ 'show_image' => 'yes', 'show_shape_underline' => 'yes', 'template' => 'template1', ], ] ); $this->add_group_control( \Elementor\Group_Control_Border::get_type(), [ 'name' => 'image_border', 'label' => esc_html__( 'Image Border', 'nighty' ), 'selector' => '{{WRAPPER}} .ova-heading .title img', 'condition' => [ 'show_image' => 'yes', 'show_shape_underline' => 'yes', 'template' => 'template1', ], ] ); $this->add_control( 'image_border_radius', [ 'label' => esc_html__( 'Image Border Radius', 'nighty' ), 'type' => \Elementor\Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%', 'em', 'rem'], 'selectors' => [ '{{WRAPPER}} .ova-heading .title img' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], 'condition' => [ 'show_image' => 'yes', 'show_shape_underline' => 'yes', 'template' => 'template1', ], ] ); $this->add_responsive_control( 'image_margin', [ 'label' => esc_html__( 'Image Margin', 'nighty' ), 'type' => \Elementor\Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%', 'em', 'rem' ], 'selectors' => [ '{{WRAPPER}} .ova-heading .title img' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], 'condition' => [ 'show_image' => 'yes', 'show_shape_underline' => 'yes', 'template' => 'template1', ], ] ); $this->end_controls_section(); //END SECTION TAB STYLE TITLE //SECTION TAB STYLE BACKGROUND TEXT $this->start_controls_section( 'section_background_text', [ 'label' => esc_html__( 'Background Text ', 'nighty' ), 'tab' => Controls_Manager::TAB_STYLE, 'condition' => [ 'show_background_text' => 'yes', 'template' => 'template5', ], ] ); $this->add_group_control( \Elementor\Group_Control_Typography::get_type(), [ 'name' => 'background_text_typography', 'selector' => '{{WRAPPER}} .ova-heading .background-text', ] ); $this->add_control( 'background_text_color', [ 'label' => esc_html__( 'Color', 'nighty' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .ova-heading .background-text' => 'color : {{VALUE}};' ], ] ); $this->add_control( 'background_text_stroke', [ 'label' => esc_html__( 'Special Text Stroke ', 'nighty' ), 'type' => \Elementor\Controls_Manager::SWITCHER, 'label_on' => esc_html__( 'Show', 'nighty' ), 'label_off' => esc_html__( 'Hide', 'nighty' ), 'return_value' => 'yes', 'default' => 'no', ] ); $this->add_control( 'background_text_stroke_color', [ 'label' => esc_html__( 'Stroke Color', 'nighty' ), 'type' => \Elementor\Controls_Manager::SELECT, 'default' => 'white', 'options' => [ 'white' => esc_html__( 'White', 'nighty' ), 'black' => esc_html__( 'Black', 'nighty' ), ], 'condition' => [ 'background_text_stroke' => 'yes', ], ] ); $this->add_control( 'background_text_opacity', [ 'label' => esc_html__( 'Opacity', 'nighty' ), 'type' => \Elementor\Controls_Manager::SLIDER, 'size_units' => [ 'px'], 'range' => [ 'px' => [ 'min' => 0, 'max' => 1, 'step' => 0.01, ], ], 'selectors' => [ '{{WRAPPER}} .ova-heading .background-text' => 'opacity: {{SIZE}};', ], ] ); $this->add_control( 'background_text_position', [ 'label' => esc_html__( 'Position', 'nighty' ), 'type' => \Elementor\Controls_Manager::HEADING, 'separator' => 'before', ] ); $this->add_control( 'background_text_top', [ 'label' => esc_html__( 'Top', 'nighty' ), 'type' => \Elementor\Controls_Manager::SLIDER, 'size_units' => [ 'px', '%', 'em', 'rem' ], 'range' => [ 'px' => [ 'min' => -500, 'max' => 500, 'step' => 1, ], '%' => [ 'min' => -100, 'max' => 100, ], ], 'selectors' => [ '{{WRAPPER}} .ova-heading .background-text' => 'top: {{SIZE}}{{UNIT}};', ], ] ); $this->add_control( 'background_text_align', [ 'label' => esc_html__( 'Alignment', 'nighty' ), 'type' => \Elementor\Controls_Manager::CHOOSE, 'options' => [ 'left' => [ 'title' => esc_html__( 'Left', 'nighty' ), 'icon' => 'eicon-text-align-left', ], 'center' => [ 'title' => esc_html__( 'Center', 'nighty' ), 'icon' => 'eicon-text-align-center', ], 'right' => [ 'title' => esc_html__( 'Right', 'nighty' ), 'icon' => 'eicon-text-align-right', ], ], 'default' => 'center', 'toggle' => true, ] ); $this->end_controls_section(); //END SECTION TAB STYLE BACKGROUND TEXT //SECTION TAB STYLE DESCRIPTION $this->start_controls_section( 'section_description', [ 'label' => esc_html__( 'Description', 'nighty' ), 'tab' => Controls_Manager::TAB_STYLE, ] ); $this->add_group_control( \Elementor\Group_Control_Typography::get_type(), [ 'name' => 'content_typography_description', 'label' => esc_html__( 'Typography', 'nighty' ), 'selector' => '{{WRAPPER}} .ova-heading .description', ] ); $this->add_control( 'color_description', [ 'label' => esc_html__( 'Color', 'nighty' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .ova-heading .description' => 'color : {{VALUE}};' ], ] ); $this->add_responsive_control( 'padding_description', [ 'label' => esc_html__( 'Padding', 'nighty' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', 'em', '%' ], 'selectors' => [ '{{WRAPPER}} .ova-heading .description ' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); $this->add_responsive_control( 'margin_description', [ 'label' => esc_html__( 'Margin', 'nighty' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', 'em', '%' ], 'selectors' => [ '{{WRAPPER}} .ova-heading .description ' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); $this->add_group_control( \Elementor\Group_Control_Border::get_type(), [ 'name' => 'description_border', 'selector' => '{{WRAPPER}} .ova-heading .description ', ] ); $this->end_controls_section(); //END SECTION TAB STYLE DESCRIPTION //SECTION TAB STYLE AUTHOR $this->start_controls_section( 'section_author', [ 'label' => esc_html__( 'Author', 'nighty' ), 'tab' => Controls_Manager::TAB_STYLE, 'condition' => [ 'template' => 'template1', 'show_author' => 'yes', ], ] ); $this->add_control( 'author_divider', [ 'label' => esc_html__( 'Divider', 'nighty' ), 'type' => \Elementor\Controls_Manager::HEADING, 'separator' => 'before', ] ); $this->add_control( 'author_divider_width', [ 'label' => esc_html__( 'Width', 'nighty' ), 'type' => \Elementor\Controls_Manager::SLIDER, 'size_units' => [ 'px', '%', 'em', 'rem' ], 'range' => [ 'px' => [ 'min' => 0, 'max' => 200, 'step' => 1, ], '%' => [ 'min' => 0, 'max' => 100, ], ], 'selectors' => [ '{{WRAPPER}} .ova-heading .author .divider' => 'width: {{SIZE}}{{UNIT}};min-width: {{SIZE}}{{UNIT}};', ], ] ); $this->add_control( 'author_divider_height', [ 'label' => esc_html__( 'Height', 'nighty' ), 'type' => \Elementor\Controls_Manager::SLIDER, 'size_units' => [ 'px', '%', 'em', 'rem' ], 'range' => [ 'px' => [ 'min' => 0, 'max' => 20, 'step' => 1, ], '%' => [ 'min' => 0, 'max' => 100, ], ], 'selectors' => [ '{{WRAPPER}} .ova-heading .author .divider' => 'height: {{SIZE}}{{UNIT}};', ], ] ); $this->add_control( 'author_divider_color', [ 'label' => esc_html__( 'Color', 'nighty' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .ova-heading .author .divider' => 'background-color : {{VALUE}};' ], ] ); $this->add_control( 'author_prefix_heading', [ 'label' => esc_html__( 'Author Prefix', 'nighty' ), 'type' => \Elementor\Controls_Manager::HEADING, 'separator' => 'before', ] ); $this->add_control( 'author_prefix_size', [ 'label' => esc_html__( 'Size', 'nighty' ), 'type' => \Elementor\Controls_Manager::SLIDER, 'size_units' => [ 'px', '%', 'em', 'rem' ], 'range' => [ 'px' => [ 'min' => 0, 'max' => 100, 'step' => 1, ], '%' => [ 'min' => 0, 'max' => 100, ], ], 'selectors' => [ '{{WRAPPER}} .ova-heading .author .author-prefix' => 'font-size: {{SIZE}}{{UNIT}};', ], ] ); $this->add_control( 'author_prefix_color', [ 'label' => esc_html__( 'Color', 'nighty' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .ova-heading .author .author-prefix' => 'color : {{VALUE}};' ], ] ); $this->add_responsive_control( 'author_prefix_margin', [ 'label' => esc_html__( 'Margin', 'nighty' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', 'em', '%' ], 'selectors' => [ '{{WRAPPER}} .ova-heading .author .author-prefix' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); $this->add_control( 'author_heading', [ 'label' => esc_html__( 'Author', 'nighty' ), 'type' => \Elementor\Controls_Manager::HEADING, 'separator' => 'before', ] ); $this->add_group_control( \Elementor\Group_Control_Typography::get_type(), [ 'name' => 'content_typography_author', 'label' => esc_html__( 'Typography', 'nighty' ), 'selector' => '{{WRAPPER}} .ova-heading .author .text', ] ); $this->add_control( 'color_author', [ 'label' => esc_html__( 'Color', 'nighty' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .ova-heading .author .text' => 'color : {{VALUE}};' ], ] ); $this->add_responsive_control( 'author_margin', [ 'label' => esc_html__( 'Margin', 'nighty' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', 'em', '%' ], 'selectors' => [ '{{WRAPPER}} .ova-heading .description ' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); $this->end_controls_section(); //END SECTION TAB STYLE AUTHOR //SECTION TAB STYLE BUTTON BOOKING $this->start_controls_section( 'section_button_booking', [ 'label' => esc_html__( 'Button Booking', 'nighty' ), 'tab' => Controls_Manager::TAB_STYLE, 'condition' => [ 'template' => 'template3', 'show_button_booking' => 'yes', ], ] ); $this->add_control( 'button_booking_width', [ 'label' => esc_html__( 'Width', 'nighty' ), 'type' => \Elementor\Controls_Manager::SLIDER, 'size_units' => [ 'px', '%', 'em', 'rem' ], 'range' => [ 'px' => [ 'min' => 0, 'max' => 300, 'step' => 1, ], '%' => [ 'min' => 0, 'max' => 100, ], ], 'selectors' => [ '{{WRAPPER}} .ova-heading.template3 .button-booking' => 'width: {{SIZE}}{{UNIT}};min-width: {{SIZE}}{{UNIT}};', ], ] ); $this->add_control( 'button_booking_height', [ 'label' => esc_html__( 'Height', 'nighty' ), 'type' => \Elementor\Controls_Manager::SLIDER, 'size_units' => [ 'px', '%', 'em', 'rem' ], 'range' => [ 'px' => [ 'min' => 0, 'max' => 300, 'step' => 1, ], '%' => [ 'min' => 0, 'max' => 100, ], ], 'selectors' => [ '{{WRAPPER}} .ova-heading.template3 .button-booking' => 'height: {{SIZE}}{{UNIT}};', ], ] ); $this->add_control( 'button_booking_background_color', [ 'label' => esc_html__( 'Background Color', 'nighty' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .ova-heading.template3 .button-booking' => 'background-color : {{VALUE}};' ], ] ); $this->add_control( 'button_booking_background_color_hover', [ 'label' => esc_html__( 'Background Color Hover', 'nighty' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .ova-heading.template3 .button-booking:hover' => 'background-color : {{VALUE}};' ], ] ); $this->add_responsive_control( 'button_booking_border_radius', [ 'label' => esc_html__( 'Border Radius', 'nighty' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', 'em', '%' ], 'selectors' => [ '{{WRAPPER}} .ova-heading.template3 .button-booking' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); $this->add_group_control( \Elementor\Group_Control_Border::get_type(), [ 'name' => 'button_booking_border', 'selector' => '{{WRAPPER}} ova-heading.template3 .button-booking', ] ); $this->add_control( 'button_booking_border_color_hover', [ 'label' => esc_html__( 'Border Color Hover', 'nighty' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .ova-heading.template3 .button-booking:hover' => 'border-color : {{VALUE}};' ], ] ); $this->add_control( 'button_booking_text_heading', [ 'label' => esc_html__( 'Text', 'nighty' ), 'type' => \Elementor\Controls_Manager::HEADING, 'separator' => 'before', ] ); $this->add_group_control( \Elementor\Group_Control_Typography::get_type(), [ 'name' => 'button_booking_text_typography', 'label' => esc_html__( 'Typography', 'nighty' ), 'selector' => '{{WRAPPER}} .ova-heading.template3 .button-booking .text-booking', ] ); $this->add_control( 'button_booking_text_color', [ 'label' => esc_html__( 'Color', 'nighty' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .ova-heading.template3 .button-booking .text-booking' => 'color : {{VALUE}};' ], ] ); $this->add_control( 'button_booking_text_color_hover', [ 'label' => esc_html__( 'Color Hover', 'nighty' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .ova-heading.template3 .button-booking:hover .text-booking' => 'color : {{VALUE}};' ], ] ); $this->add_responsive_control( 'button_booking_text_margin', [ 'label' => esc_html__( 'Margin', 'nighty' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', 'em', '%' ], 'selectors' => [ '{{WRAPPER}} .ova-heading.template3 .button-booking .text-booking' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); $this->add_control( 'button_booking_icon_heading', [ 'label' => esc_html__( 'Icon', 'nighty' ), 'type' => \Elementor\Controls_Manager::HEADING, 'separator' => 'before', ] ); $this->add_control( 'button_booking_icon_size', [ 'label' => esc_html__( 'Size', 'nighty' ), 'type' => \Elementor\Controls_Manager::SLIDER, 'size_units' => [ 'px', '%', 'em', 'rem' ], 'range' => [ 'px' => [ 'min' => 0, 'max' => 100, 'step' => 1, ], '%' => [ 'min' => 0, 'max' => 100, ], ], 'selectors' => [ '{{WRAPPER}} .ova-heading.template3 .button-booking i' => 'font-size: {{SIZE}}{{UNIT}};', ], ] ); $this->add_control( 'button_booking_icon_color', [ 'label' => esc_html__( 'Color', 'nighty' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .ova-heading.template3 .button-booking i' => 'color : {{VALUE}};' ], ] ); $this->add_control( 'button_booking_icon_color_hover', [ 'label' => esc_html__( 'Color Hover', 'nighty' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .ova-heading.template3 .button-booking:hover i' => 'color : {{VALUE}};' ], ] ); $this->end_controls_section(); //END SECTION TAB STYLE AUTHOR } // Render Template Here protected function render() { $settings = $this->get_settings(); $template = $settings['template']; $prefix = $settings['prefix']; $sub_title = $settings['sub_title']; $show_underline = $settings['show_underline']; $title = $settings['title']; $title_feature_image = $settings['title_feature_image']; $alt = ( isset( $title_feature_image['alt'] ) && $title_feature_image['alt'] != '') ? $title_feature_image['alt'] : $title; $description = $settings['description']; $tag = $settings['html_tag']; $link = $settings['link']['url']; $target = $settings['link']['is_external'] ? '_blank' : '_self'; $nofollow = ( isset( $link['nofollow'] ) && $link['nofollow'] ) ? 'rel=nofollow' : ''; $special_text_custom = $settings['special_text_custom']; $special_text_stroke = $settings['special_text_stroke']; $special_text_stroke_color = $settings['special_text_stroke_color']; $show_background_text = $settings['show_background_text']; $background_text = $settings['background_text']; $background_text_align = $settings['background_text_align']; $background_text_stroke = $settings['background_text_stroke']; $background_text_stroke_color = $settings['background_text_stroke_color']; $show_author = $settings['show_author']; $author_prefix = $settings['author_prefix']; $author = $settings['author']; $show_button_booking = $settings['show_button_booking']; $text_booking = $settings['text_booking']; $link_booking = $settings['link_booking']['url']; $target_booking = $settings['link_booking']['is_external'] ? '_blank' : '_self'; $nofollow_booking = ( isset( $settings['link_booking']['nofollow'] ) && $settings['link_booking']['nofollow'] ) ? 'rel=nofollow' : ''; $show_image = $settings['show_image']; $show_shape_underline = $settings['show_shape_underline']; $word_position = $settings['word_position'] ? $settings['word_position'] : 0 ; if( $template != 'template3' && $template != 'template5' && $special_text_custom == 'yes' ){ // replace % to %% avoid printf error if(strpos($title, '%') !== false){ $title = str_replace('%', '%%', $title); } $explode_fullname = explode(' ', $title); if ( isset($explode_fullname[$word_position]) ) { if( $show_image == 'yes' && $title_feature_image['url'] != '' ) { $replace = '<span class="word">' . $explode_fullname[$word_position] . '</span>'."<img src='{$title_feature_image['url']}' alt='{$alt}'>"; }else{ $replace = '<span class="word">' . $explode_fullname[$word_position] . '</span>'; } $title = str_replace( $explode_fullname[$word_position], $replace, $title ); } } ?> <div class="ova-heading <?php echo esc_attr( $template ); ?> "> <?php if($sub_title) : ?> <div class="sub-title-wrapper <?php if( $show_underline != '' ) echo "underline"; ?> "> <?php if($prefix) { ?> <span class="prefix"><?php echo esc_html($prefix); ?></span> <?php } ?> <h4 class="sub-title"><?php echo esc_html($sub_title); ?></h4> </div> <?php endif; ?> <?php if($title) : ?> <?php if($link) { ?> <<?php echo esc_attr($tag); ?> class="title <?php if( $show_shape_underline == '' ) echo "no-shape-underline"; ?> <?php if( $special_text_stroke == 'yes' && $special_text_stroke_color == 'white') { echo "text-stroke-white"; } elseif( $special_text_stroke == 'yes' && $special_text_stroke_color == 'black'){ echo "text-stroke-black"; } ?> "> <a href="<?php echo esc_attr($link); ?>" target='<?php echo esc_attr($target); ?>' <?php echo esc_attr($nofollow); ?>> <?php printf($title); ?> </a> </<?php echo esc_attr($tag); ?>> <?php }else{ ?> <<?php echo esc_attr($tag); ?> class="title <?php if( $show_shape_underline == '' ) echo "no-shape-underline"; ?> <?php if( $special_text_stroke == 'yes' && $special_text_stroke_color == 'white') { echo "text-stroke-white"; }elseif( $special_text_stroke == 'yes' && $special_text_stroke_color == 'black'){ echo "text-stroke-black"; } ?> "><?php printf($title); ?></<?php echo esc_attr($tag); ?>> <?php } ?> <?php endif; ?> <?php if( $background_text != '' && $show_background_text == 'yes' && $template == 'template5' ) : ?> <span class="background-text <?php if( $background_text_stroke == 'yes' && $background_text_stroke_color == 'white') { echo "background-text-stroke-white"; }elseif( $background_text_stroke == 'yes' && $background_text_stroke_color == 'black'){ echo "background-text-stroke-black"; } ?> alignment-<?php echo esc_attr($background_text_align); ?> "><?php echo esc_html( $background_text ); ?></span> <?php endif; ?> <?php if($description) { ?> <p class="description"><?php echo esc_html($description); ?></p> <?php } ?> <?php if( $author != '' && $show_author == 'yes' && $template == 'template1' ) { ?> <div class="author"> <span class="divider"></span> <span class="author-prefix"><?php echo esc_html( $author_prefix ); ?></span> <span class="text"><?php echo esc_html($author); ?></span> </div> <?php } ?> <?php if( ($text_booking != '' || $settings['icon_booking'] != '') && $show_button_booking == 'yes' && $template == 'template3' && $link_booking != '' ) { ?> <a href="<?php echo esc_attr($link_booking); ?>" class="button-booking" target='<?php echo esc_attr($target_booking); ?>' <?php echo esc_attr($nofollow_booking); ?>> <?php if( $text_booking != '') { ?> <span class="text-booking"><?php echo esc_html( $text_booking); ?></span> <?php } ?> <?php \Elementor\Icons_Manager::render_icon( $settings['icon_booking'], [ 'aria-hidden' => 'true' ] ); ?> </a> <?php } ?> </div> <?php } } $widgets_manager->register( new Nighty_Elementor_Heading() );
💾 Save Changes
❌ Cancel