Submit
Path:
~
/
home
/
getwphos
/
www
/
radkingpanels
/
wp-content
/
plugins
/
poolax-core
/
addons
/
widgets
/
File Content:
poolax-section-title.php
<?php use \Elementor\Widget_Base; use \Elementor\Controls_Manager; use \Elementor\Group_Control_Typography; use \Elementor\Group_Control_Border; use \Elementor\Utils; /** * * Section Title Widget . * */ class Poolax_Section_Title extends Widget_Base { public function get_name() { return 'poolaxsectiontitle'; } public function get_title() { return __( 'Section Title', 'poolax' ); } public function get_icon() { return 'th-icon'; } public function get_categories() { return [ 'poolax' ]; } protected function register_controls() { $this->start_controls_section( 'section_title_section', [ 'label' => __( 'Section Title', 'poolax' ), 'tab' => Controls_Manager::TAB_CONTENT, ] ); $this->add_control( 'layout_style', [ 'label' => __( 'Layout Style', 'poolax' ), 'type' => Controls_Manager::SELECT, 'default' => '1', 'options' => [ '1' => __( 'Style One', 'poolax' ), '2' => __( 'Style Two', 'poolax' ), ], ] ); $this->add_control( 'subtitle_shape', [ 'label' => __( 'Shape Position', 'poolax' ), 'type' => Controls_Manager::SELECT, 'options' => [ '1' => 'Both', '2' => 'Left', '3' => 'Right', ], 'default' => '1', 'condition' => [ 'layout_style' => ['2'] ], ] ); poolax_general_fields($this, 'section_subtitle', 'Subtitle', 'TEXT', 'Subtitle'); poolax_general_fields($this, 'section_subtitle_class', 'Subtitle Extra Class', 'TEXT', ''); poolax_general_fields($this, 'section_title', 'Title', 'TEXTAREA', 'Title Here'); $this->add_control( 'section_title_tag', [ 'label' => __( 'Title Tag', 'poolax' ), 'type' => Controls_Manager::SELECT, 'options' => [ 'h1' => 'H1', 'h2' => 'H2', 'h3' => 'H3', 'h4' => 'H4', 'h5' => 'H5', 'h6' => 'H6', 'span' => 'span', ], 'default' => 'h2', ] ); poolax_general_fields($this, 'section_desc', 'Description', 'TEXTAREA', ''); poolax_general_fields($this, 'section_desc_class', 'Description Class', 'TEXT', ''); $this->add_responsive_control( 'section_align', [ 'label' => __( 'Alignment', 'poolax' ), 'type' => Controls_Manager::CHOOSE, 'options' => [ 'left' => [ 'title' => __( 'Left', 'poolax' ), 'icon' => 'eicon-text-align-left', ], 'center' => [ 'title' => __( 'Center', 'poolax' ), 'icon' => 'eicon-text-align-center', ], 'right' => [ 'title' => __( 'Right', 'poolax' ), 'icon' => 'eicon-text-align-right', ], ], 'default' => '', 'toggle' => true, 'selectors' => [ '{{WRAPPER}} .title-area' => 'text-align: {{VALUE}};', ] ] ); poolax_general_fields($this, 'wrap_class', 'Wraper Extra Class', 'TEXT', ''); $this->end_controls_section(); //--------------------------------------- //Style Section Start //--------------------------------------- //-------------------------General Style-----------------------// $this->start_controls_section( 'general_style_section', [ 'label' => __( 'General Style', 'poolax' ), 'tab' => Controls_Manager::TAB_STYLE, ] ); poolax_dimensions_fields($this, 'menu_margin', 'Margin', 'margin', '{{WRAPPER}} .title-area'); $this->end_controls_section(); //-------Subtitle Style------- poolax_common_style_fields($this, 'subtitle', 'Subtitle', '{{WRAPPER}} .sub-title', '','--theme-color'); //-------Title Style------- poolax_common_style_fields($this, 'title', 'Title', '{{WRAPPER}} .sec-title'); //-------Description Style------- poolax_common_style_fields($this, 'desc', 'Description', '{{WRAPPER}} p'); } protected function render() { $settings = $this->get_settings_for_display(); if (isset($settings['section_align'])) { if ($settings['section_align'] == 'left') { $wrap_align_class = 'text-left'; } elseif ($settings['section_align'] == 'center') { $wrap_align_class = 'text-center'; } elseif ($settings['section_align'] == 'right') { $wrap_align_class = 'text-right'; } else { $wrap_align_class = ''; } } else { // Default value if 'section_align' is not set $wrap_align_class = 'text-left'; } $this->add_render_attribute( 'subtitle_args', 'class', 'sub-title '. $settings['section_subtitle_class'] ); $this->add_render_attribute( 'title_args', 'class', 'sec-title' ); ?> <div class="title-area <?php echo esc_attr($wrap_align_class . ' ' . $settings['wrap_class']); ?>"> <?php if ( !empty($settings['section_subtitle' ]) ){ echo '<span '.$this->get_render_attribute_string( 'subtitle_args' ).'>'; if( $settings['layout_style'] == '2' ){ if( $settings['subtitle_shape'] == '1' || $settings['subtitle_shape'] == '2' ){ echo '<img src="'.POOLAX_ASSETS.'img/title_left.svg" alt="shape">'; } } echo wp_kses_post( $settings['section_subtitle' ] ); if( $settings['layout_style'] == '2' ){ if( $settings['subtitle_shape'] == '1' || $settings['subtitle_shape'] == '3' ){ echo '<img src="'.POOLAX_ASSETS.'img/title_right.svg" alt="shape">'; } } echo '</span>'; } if ( !empty($settings['section_title' ]) ) : printf( '<%1$s %2$s>%3$s</%1$s>', $settings['section_title_tag'], $this->get_render_attribute_string( 'title_args' ), wp_kses_post( $settings['section_title' ] ) ); endif; if( ! empty( $settings['section_desc'] ) ){ echo poolax_paragraph_tag( array( 'text' => wp_kses_post( $settings['section_desc'] ), 'class' => esc_attr($settings['section_desc_class']), ) ); } ?> </div> <?php } }
Submit
FILE
FOLDER
Name
Size
Permission
Action
poolax-about-us.php
11054 bytes
0644
poolax-animated-shape.php
5700 bytes
0644
poolax-arrows.php
2016 bytes
0644
poolax-banner.php
24342 bytes
0644
poolax-banner2.php
11984 bytes
0644
poolax-blog.php
29013 bytes
0644
poolax-brand-logo.php
4578 bytes
0644
poolax-button.php
5216 bytes
0644
poolax-choose-us.php
11970 bytes
0644
poolax-choose.php
14048 bytes
0644
poolax-classes.php
6523 bytes
0644
poolax-contact-form.php
10525 bytes
0644
poolax-contact-info.php
13756 bytes
0644
poolax-counterup.php
10646 bytes
0644
poolax-cta.php
6743 bytes
0644
poolax-download-button.php
2675 bytes
0644
poolax-faq.php
9485 bytes
0644
poolax-features.php
18133 bytes
0644
poolax-footer-widgets.php
2660 bytes
0644
poolax-gallery-filter.php
4974 bytes
0644
poolax-gallery.php
12033 bytes
0644
poolax-image.php
11605 bytes
0644
poolax-info-box.php
11747 bytes
0644
poolax-marquee.php
4578 bytes
0644
poolax-menu-select.php
4451 bytes
0644
poolax-newsletter.php
13804 bytes
0644
poolax-offer.php
3931 bytes
0644
poolax-portfolio-info.php
6899 bytes
0644
poolax-portfolio.php
11562 bytes
0644
poolax-price.php
4725 bytes
0644
poolax-section-title.php
6036 bytes
0644
poolax-service-list.php
2526 bytes
0644
poolax-service.php
19858 bytes
0644
poolax-skill.php
4691 bytes
0644
poolax-social.php
2730 bytes
0644
poolax-step.php
11915 bytes
0644
poolax-tab-builder.php
3744 bytes
0644
poolax-team-info.php
3873 bytes
0644
poolax-team.php
31875 bytes
0644
poolax-testimonial.php
38256 bytes
0644
poolax-video.php
3149 bytes
0644
N4ST4R_ID | Naxtarrr