/
home
/
techb158
/
l2hypotheques.com
/
wp-content
/
plugins
/
pyloncore
/
elementor
/
widgets
/
/home/techb158/l2hypotheques.com/wp-content/plugins/pyloncore/elementor/widgets
mkdir
upload
Name
Size
Mode
Actions
about-widget.php
28968
0644
edit
dl
rm
accordion-widget.php
22046
0644
edit
dl
rm
animation-shape.php
6751
0644
edit
dl
rm
animation-shape1.php
6554
0644
edit
dl
rm
banner-widget.php
20414
0644
edit
dl
rm
blog-widget.php
54710
0644
edit
dl
rm
button-widget.php
13626
0644
edit
dl
rm
call-to-action-widget.php
30409
0644
edit
dl
rm
client-logo-widget.php
14507
0644
edit
dl
rm
company-ceo.php
11289
0644
edit
dl
rm
contact-static-info-widget.php
22925
0644
edit
dl
rm
content-list-widget.php
29429
0644
edit
dl
rm
counter-box.php
16659
0644
edit
dl
rm
credit-card-widget.php
25564
0644
edit
dl
rm
custom-ripple-widget.php
2311
0644
edit
dl
rm
featuredbox-widget.php
43339
0644
edit
dl
rm
funfact-widget.php
26527
0644
edit
dl
rm
iconbox-widget.php
42282
0644
edit
dl
rm
image-float-widget.php
4050
0644
edit
dl
rm
image-widget.php
51246
0644
edit
dl
rm
image-with-title-widget.php
13185
0644
edit
dl
rm
loan-calculator-widget.php
56730
0644
edit
dl
rm
loan-combined-calculator-widget.php
75266
0644
edit
dl
rm
loan-eligibility-widget.php
24342
0644
edit
dl
rm
popup-widget.php
17573
0644
edit
dl
rm
progress-widget.php
15577
0644
edit
dl
rm
responsive-image-widget.php
1672
0644
edit
dl
rm
service-widget.php
60028
0644
edit
dl
rm
slider-widget.php
49682
0644
edit
dl
rm
slider2-widget.php
37782
0644
edit
dl
rm
team-two-widget.php
19602
0644
edit
dl
rm
team-widget.php
31622
0644
edit
dl
rm
testimonial-widget.php
55646
0644
edit
dl
rm
title-widget.php
28910
0644
edit
dl
rm
total-loan-calculator-widget.php
54789
0644
edit
dl
rm
why-choose-us-widget.php
10166
0644
edit
dl
rm
Edit:
/home/techb158/l2hypotheques.com/wp-content/plugins/pyloncore/elementor/widgets/button-widget.php
(13626B)
<?php namespace Elementor; if (!defined('ABSPATH')) { exit; // Exit if accessed directly } class Pylon_button_Widget extends Widget_Base { public function get_name() { return 'pylon_button'; } public function get_title() { return esc_html__( 'Pylon Button', 'pyloncore' ); } public function get_icon() { return 'eicon-button'; } public function get_categories() { return ['pylon']; } protected function register_controls() { //Content tab start $this->start_controls_section( 'pylon_button_options', [ 'label' => esc_html__( 'Pylon Button', 'pyloncore' ), 'tab' => Controls_Manager::TAB_CONTENT, ] ); $this->add_responsive_control( 'pylon_button_style_select', [ 'label' => esc_html__( 'Select Style', 'pyloncore' ), 'type' => \Elementor\Controls_Manager::SELECT, 'default' => '1', 'options' => [ '1' => esc_html__( 'Style One', 'pyloncore' ), '2' => esc_html__( 'Style Two', 'pyloncore' ), '3' => esc_html__( 'Style Three', 'pyloncore' ), ], ] ); $this->add_responsive_control( 'textign', [ 'label' => esc_html__( 'Alignment', 'pyloncore' ), 'type' => \Elementor\Controls_Manager::CHOOSE, 'options' => [ 'left' => [ 'title' => esc_html__( 'Left', 'pyloncore' ), 'icon' => 'eicon-text-align-left', ], 'center' => [ 'title' => esc_html__( 'Center', 'pyloncore' ), 'icon' => 'eicon-text-align-center', ], 'right' => [ 'title' => esc_html__( 'Right', 'pyloncore' ), 'icon' => 'eicon-text-align-right', ], ], 'default' => 'center', 'toggle' => true, 'selectors' => [ '{{WRAPPER}} .thm-btn,{{WRAPPER}} .btn-box' => 'text-align: {{VALUE}};', ], ] ); $this->add_control( 'pylon_button_btn_links', [ 'label' => esc_html__( 'Select Link', 'pyloncore' ), 'type' => Controls_Manager::SELECT, 'default' => 'extranal', 'options' => [ 'extranal' => esc_html__( 'Extranal', 'pyloncore' ), 'page' => esc_html__( 'Page', 'pyloncore' ), ], 'label_block' => true, ] ); $this->add_control( 'pylon_button_extral', [ 'label' => esc_html__( 'Extranal Link', 'pyloncore' ), 'type' => Controls_Manager::TEXT, 'dynamic' => [ 'active' => true, ], 'placeholder' => esc_html__( 'Add Extranal Link', 'pyloncore' ), 'label_block' => true, 'condition' => [ 'pylon_button_btn_links' => 'extranal', ], ] ); $this->add_control( 'pylon_button_page_link', [ 'label' => esc_html__( 'Page Link', 'pyloncore' ), 'type' => Controls_Manager::SELECT, 'options' => pylon_page_list(), 'label_block' => true, 'condition' => [ 'pylon_button_btn_links' => 'page', ], ] ); $this->add_control( 'pylon_button_btn_text', [ 'label' => esc_html__( 'Buttn Text', 'pyloncore' ), 'type' => Controls_Manager::TEXT, 'default' => esc_html__( 'Apply For Loan', 'pyloncore' ), 'label_block' => true, ] ); $this->add_control( 'pylon_button_btn_New_tab', [ 'label' => esc_html__( 'Open New Tab ? ', 'pyloncore' ), 'type' => Controls_Manager::SWITCHER, 'label_on' => esc_html__( 'Yes', 'infotechcore' ), 'label_off' => esc_html__( 'No', 'infotechcore' ), 'return_value' => 'yes', 'default' => 'no', ] ); $this->end_controls_section(); $this->start_controls_section( 'pylon_button_style', [ 'label' => esc_html__( 'Button', 'pyloncore' ), 'tab' => Controls_Manager::TAB_STYLE, ] ); $this->add_group_control( \Elementor\Group_Control_Typography::get_type(), [ 'name' => 'pylon_button_typo', 'label' => esc_html__( 'Title Typography', 'pyloncore' ), 'selector' => '{{WRAPPER}} .thm-btn,{{WRAPPER}} .thm-btn2', ] ); $this->add_responsive_control( 'pylon_button_margin', [ 'label' => esc_html__( 'Margin', 'pyloncore' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => ['px', '%', 'em'], 'selectors' => [ '{{WRAPPER}} .thm-btn,{{WRAPPER}} .thm-btn2' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], 'separator' => 'before', ] ); $this->add_responsive_control( 'pylon_button_padding', [ 'label' => esc_html__( 'Padding', 'pyloncore' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => ['px', '%', 'em'], 'default' => [ 'top' => '16.5', 'right' => '39.5', 'bottom' => '16.5', 'left' => '39.5', 'isLinked' => true, ], 'selectors' => [ '{{WRAPPER}} .thm-btn,{{WRAPPER}} .thm-btn2' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], 'separator' => 'before', ] ); $this->start_controls_tabs( 'pylon_button_tabs' ); $this->start_controls_tab( 'pylon_button_n_tab', [ 'label' => esc_html__( 'Normal', 'pyloncore' ), ] ); $this->add_responsive_control( 'pylon_button_n_color', [ 'label' => esc_html__( 'Color', 'pyloncore' ), 'type' => \Elementor\Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .thm-btn,{{WRAPPER}} .thm-btn2' => 'color: {{VALUE}}', ], ] ); $this->add_group_control( \Elementor\Group_Control_Background::get_type(), [ 'name' => 'pylon_button_n_bg', 'label' => esc_html__( 'Background', 'pyloncore' ), 'types' => ['classic', 'gradient'], 'selector' => '{{WRAPPER}} .thm-btn,{{WRAPPER}} .thm-btn2', ] ); $this->add_group_control( \Elementor\Group_Control_Border::get_type(), [ 'name' => 'pylon_button_n_border', 'label' => esc_html__( 'Border', 'pyloncore' ), 'selector' => '{{WRAPPER}} .thm-btn,{{WRAPPER}} .thm-btn2', ] ); $this->add_responsive_control( 'pylon_button_n_border_radius', [ 'label' => esc_html__( 'Border Radius', 'pyloncore' ), 'type' => Controls_Manager::SLIDER, 'size_units' => ['px'], 'range' => [ 'px' => [ 'min' => 0, 'max' => 100, 'step' => 1, ], ], 'default' => [ 'size' => 4, ], 'selectors' => [ '{{WRAPPER}} .thm-btn,{{WRAPPER}} .thm-btn2' => 'border-radius: {{SIZE}}{{UNIT}};', ], ] ); $this->add_group_control( \Elementor\Group_Control_Box_Shadow::get_type(), [ 'name' => 'pylon_button_n_box_shadow', 'label' => esc_html__( 'Box Shadow', 'pyloncore' ), 'selector' => '{{WRAPPER}} .thm-btn,{{WRAPPER}} .thm-btn2', ] ); $this->end_controls_tab(); $this->start_controls_tab( 'pylon_button_h_tab', [ 'label' => esc_html__( 'Hover', 'pyloncore' ), ] ); $this->add_responsive_control( 'pylon_button_h_color', [ 'label' => esc_html__( 'Color', 'pyloncore' ), 'type' => \Elementor\Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .thm-btn:hover, {{WRAPPER}} .elementor-widget-container .btn-box .thm-btn2:before' => 'color: {{VALUE}}', ], ] ); $this->add_group_control( \Elementor\Group_Control_Background::get_type(), [ 'name' => 'pylon_button_h_bg', 'label' => esc_html__( 'Background', 'pyloncore' ), 'types' => ['classic', 'gradient'], 'selector' => '{{WRAPPER}} .thm-btn:hover,{{WRAPPER}} .thm-btn2:hover:before', ] ); $this->add_group_control( \Elementor\Group_Control_Border::get_type(), [ 'name' => 'pylon_button_h_border', 'label' => esc_html__( 'Border', 'pyloncore' ), 'selector' => '{{WRAPPER}} .thm-btn:hover,{{WRAPPER}} .thm-btn2:before', ] ); $this->add_responsive_control( 'pylon_button_h_border_radius', [ 'label' => esc_html__( 'Border Radius', 'pyloncore' ), 'type' => Controls_Manager::SLIDER, 'size_units' => ['px'], 'range' => [ 'px' => [ 'min' => 0, 'max' => 100, 'step' => 1, ], ], 'default' => [ 'size' => 4, ], 'selectors' => [ '{{WRAPPER}} .thm-btn:hover,{{WRAPPER}} .thm-btn2:before' => 'border-radius: {{SIZE}}{{UNIT}};', ], ] ); $this->add_group_control( \Elementor\Group_Control_Box_Shadow::get_type(), [ 'name' => 'pylon_button_h_box_shadow', 'label' => esc_html__( 'Box Shadow', 'pyloncore' ), 'selector' => '{{WRAPPER}} .thm-btn:hover,{{WRAPPER}} .thm-btn2:before', ] ); $this->end_controls_tab(); $this->end_controls_tabs(); $this->end_controls_section(); } //Render protected function render() { $settings = $this->get_settings_for_display(); if ( $settings['pylon_button_btn_links'] == 'page' ) { $pylon_link = get_page_link( $settings['pylon_button_page_link'] ); } else { $pylon_link = $settings['pylon_button_extral']; } ob_start(); if($settings['pylon_button_style_select'] == '1'){ ?> <a href="<?php echo esc_url( $pylon_link ); ?>" class=" thm-btn" <?php if ( $settings['pylon_button_btn_New_tab'] == 'yes' ): ?> target="_blank" <?php endif;?>><?php echo esc_html( $settings['pylon_button_btn_text'] ); ?></a> <?php }elseif ($settings['pylon_button_style_select'] == '2') { ?> <div class="btn-box"> <a class="thm-btn2 <?php if ( $settings['pylon_button_btn_New_tab'] == 'yes' ): ?> <?php endif;?>" href="<?php echo esc_url( $pylon_link ); ?>"><?php echo esc_html( $settings['pylon_button_btn_text'] ); ?></a> </div> <?php }elseif($settings['pylon_button_style_select'] == '3'){ echo '<div class="slogan-one__inner"> <div class="btn-box"> <a class="thm-btn2 btn2" href=" '. esc_url( $pylon_link ).' ">'. esc_html( $settings['pylon_button_btn_text'] ).'</a> </div> </div>'; } echo ob_get_clean(); } } Plugin::instance()->widgets_manager->register_widget_type( new Pylon_button_Widget );
Save
cmd:
run