????
Current Path : /home/darkwebsol/acrepairkwt.com/wp-content/plugins/arkdin-core/include/elementor/ |
Current File : /home/darkwebsol/acrepairkwt.com/wp-content/plugins/arkdin-core/include/elementor/page-banner.php |
<?php namespace TSCore\Widgets; use Elementor\Widget_Base; use Elementor\Controls_Manager; use \Elementor\Group_Control_Image_Size; use \Elementor\Repeater; use \Elementor\Utils; use \Elementor\Group_Control_Border; use \Elementor\Group_Control_Box_Shadow; use \Elementor\Group_Control_Text_Shadow; use \Elementor\Group_Control_Typography; Use \Elementor\Core\Schemes\Typography; use \Elementor\Group_Control_Background; if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly /** * Solutek Core * * Elementor widget for hello world. * * @since 1.0.0 */ class TG_Apply_Now extends Widget_Base { /** * Retrieve the widget name. * * @since 1.0.0 * * @access public * * @return string Widget name. */ public function get_name() { return 'page-banner'; } /** * Retrieve the widget title. * * @since 1.0.0 * * @access public * * @return string Widget title. */ public function get_title() { return __( 'Page Banner', 'tscore' ); } /** * Retrieve the widget icon. * * @since 1.0.0 * * @access public * * @return string Widget icon. */ public function get_icon() { return 'tp-icon'; } /** * Retrieve the list of categories the widget belongs to. * * Used to determine where to display the widget in the editor. * * Note that currently Elementor supports only one category. * When multiple categories passed, Elementor uses the first one. * * @since 1.0.0 * * @access public * * @return array Widget categories. */ public function get_categories() { return [ 'tscore' ]; } /** * Retrieve the list of scripts the widget depended on. * * Used to set scripts dependencies required to run the widget. * * @since 1.0.0 * * @access public * * @return array Widget scripts dependencies. */ public function get_script_depends() { return [ 'tscore' ]; } /** * Register the widget controls. * * Adds different input fields to allow the user to change and customize the widget settings. * * @since 1.0.0 * * @access protected */ protected function register_controls() { // _tg_image $this->start_controls_section( '_tg_bg_section', [ 'label' => esc_html__('Background Image', 'tscore'), ] ); $this->add_control( 'tg_bg', [ 'label' => esc_html__( 'Choose Image', 'tscore' ), 'type' => \Elementor\Controls_Manager::MEDIA, 'default' => [ 'url' => \Elementor\Utils::get_placeholder_image_src(), ] ] ); $this->add_group_control( Group_Control_Image_Size::get_type(), [ 'name' => 'tg_bg_size', 'default' => 'full', 'exclude' => [ 'custom' ] ] ); $this->end_controls_section(); // tg_section_title $this->start_controls_section( 'tg_section_title2', [ 'label' => esc_html__('Breadcumb', 'tscore'), ] ); $this->add_control( 'tg_section_title_show2', [ 'label' => esc_html__( 'Breadcumb Hide', 'tscore' ), 'type' => Controls_Manager::SWITCHER, 'label_on' => esc_html__( 'Show', 'tscore' ), 'label_off' => esc_html__( 'Hide', 'tscore' ), 'return_value' => 'yes', 'default' => 'yes', ] ); $this->end_controls_section(); // TAB_STYLE $this->start_controls_section( 'section_style', [ 'label' => __( 'Style', 'tscore' ), 'tab' => Controls_Manager::TAB_STYLE, ] ); $this->add_control( 'text_transform', [ 'label' => __( 'Text Transform', 'tscore' ), 'type' => Controls_Manager::SELECT, 'default' => '', 'options' => [ '' => __( 'None', 'tscore' ), 'uppercase' => __( 'UPPERCASE', 'tscore' ), 'lowercase' => __( 'lowercase', 'tscore' ), 'capitalize' => __( 'Capitalize', 'tscore' ), ], 'selectors' => [ '{{WRAPPER}} .breadcumb-content h4' => 'text-transform: {{VALUE}};', ], ] ); $this->end_controls_section(); } /** * Render the widget output on the frontend. * * Written in PHP and used to generate the final HTML. * * @since 1.0.0 * * @access protected */ protected function render() { $settings = $this->get_settings_for_display(); if ( !empty($settings['tg_bg']['url']) ) { $tg_bg_url = !empty($settings['tg_bg']['id']) ? wp_get_attachment_image_url( $settings['tg_bg']['id'], $settings['tg_bg_size_size']) : $settings['tg_bg']['url']; $tg_bg_alt = get_post_meta($settings["tg_bg"]["id"], "_wp_attachment_image_alt", true); } ?> <div class="breadcumb-area about" data-src="<?php echo esc_url($tg_bg_url); ?>"> <div class="container"> <div class="row"> <div class="col-lg-12"> <div class="breadcumb-content"> <h4><?php echo get_the_title(); ?></h4> <?php if( !empty($settings['tg_section_title_show2']) ) : ?> <ul class="breadcumb-list"> <li><a href="index.html">Home</a></li> <li class="list-arrow"><</li> <li><?php echo get_the_title(); ?></li> </ul> <?php endif; ?> </div> </div> </div> </div> </div> <?php } } $widgets_manager->register( new TG_Apply_Now() );