Sid Gifari From Gifari Industries - BD Cyber Security Team
Home
/
home
/
drleilu
/
www
/
wp-content
/
themes
/
luxia
/
inc
/
includes
/
integrations
/
elementor
/
widgets
/
✏️
Editing: about.php
<?php namespace Elementor; if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly class Elementor_About_box extends Widget_Base { public function get_name() { return 'Elementor-About-widget'; } public function get_title() { return __( 'Zc > About' ,'luxia' ); } public function get_icon() { return 'eicon-slider-device'; } protected function _register_controls() { $traits = new \luxia_Elementor_Traits($this); $this->start_controls_section( 'section_tab', [ 'label' =>esc_html__( 'About', 'luxia' ), ] ); $this->add_control( 'style', [ 'type' => Controls_Manager::SELECT, 'label' => esc_html__( 'Choose Style', 'luxia' ), 'default' => 'style1', 'label_block' => true, 'options' => [ 'style1' =>esc_html__( 'About Style 1', 'luxia' ), 'style2' =>esc_html__( 'About Style 2', 'luxia' ), 'style3' =>esc_html__( 'About Style 3', 'luxia' ), 'style4' =>esc_html__( 'About Style 4', 'luxia' ), ], ] ); $this->add_control( 'icon', [ 'label' =>esc_html__( 'Icon', 'luxia' ), 'type' => Controls_Manager::TEXT, 'condition' => [ 'style' =>['style5'], ], ] ); $this->add_control( 'header_background_color', [ 'label' => __( 'Background Color Overlay', 'luxia' ), 'type' => Controls_Manager::COLOR, 'condition' => [ 'style' =>['style2','style3'], ], 'selectors' => [ '{{WRAPPER}} .slider-bg2::before,.slider-bg3::before' => 'background-color: {{VALUE}};', '{{WRAPPER}} .slider-bg2 .slider-content.second-slider-content::before,.slider-bg2 .slider-content.second-slider-content::after' => 'border-color: {{VALUE}};', ], ] ); $this->add_control( 'about_backgrund_images', [ 'label' =>esc_html__( 'Background Image', 'luxia' ), 'type' => Controls_Manager::MEDIA, 'condition' => [ 'style' =>['style4'], ], ] ); $this->add_control( 'main_img', [ 'label' =>esc_html__( 'Main Image', 'luxia' ), 'type' => Controls_Manager::MEDIA, 'condition' => [ 'style' =>['style1','style2','style3','style4'], ], ] ); $this->add_control( 'icon_images', [ 'label' =>esc_html__( 'Icon Images', 'luxia' ), 'type' => Controls_Manager::MEDIA, 'condition' => [ 'style' =>['style1','style2','style3'], ], ] ); $this->add_control( 'user_image', [ 'label' =>esc_html__( 'User Image', 'luxia' ), 'type' => Controls_Manager::MEDIA, 'condition' => [ 'style' =>['style5'], ], ] ); $this->add_control( 'text_heading', [ 'label' =>esc_html__( 'Text Heading', 'luxia' ), 'type' => Controls_Manager::TEXT, 'condition' => [ 'style' =>['style1','style2','style3'], ], ] ); $this->add_control( 'sub_heading', [ 'label' =>esc_html__( 'Sub Heading', 'luxia' ), 'type' => Controls_Manager::TEXT, 'label_block' => true, 'placeholder' =>esc_html__( 'luxia Text', 'luxia' ), 'default' =>esc_html__( 'luxia', 'luxia' ), 'condition' => [ 'style' =>['style1','style2','style4'], ], ] ); $this->add_control( 'header_video', [ 'label' =>esc_html__( 'Choose File Video', 'luxia' ), 'type' => Controls_Manager::MEDIA, 'condition' => [ 'style' =>['style5'], ], ] ); $this->add_control( 'name', [ 'label' =>esc_html__( 'User Name', 'luxia' ), 'type' => Controls_Manager::TEXT, 'condition' => [ 'style' =>['style5'], ], ] ); $this->add_control( 'potions', [ 'label' =>esc_html__( 'Position', 'luxia' ), 'type' => Controls_Manager::TEXT, 'condition' => [ 'style' =>['style5'], ], ] ); $this->add_control( 'signature', [ 'label' =>esc_html__( 'User Signature Image', 'luxia' ), 'type' => Controls_Manager::MEDIA, 'condition' => [ 'style' =>['style5'], ], ] ); $this->add_control( 'desc_title', [ 'label' =>esc_html__( 'Description', 'luxia' ), 'type' => Controls_Manager::TEXTAREA, 'label_block' => true, 'placeholder' =>esc_html__( 'luxia Text', 'luxia' ), 'default' =>esc_html__( 'luxia', 'luxia' ), 'condition' => [ 'style' => ['style1','style2','style3','style4'] ], ] ); $this->add_control( 'slider_button', [ 'label' =>esc_html__( 'Slider Button Text', 'luxia' ), 'type' => Controls_Manager::TEXTAREA, 'label_block' => true, 'placeholder' =>esc_html__( 'luxia Text', 'luxia' ), 'default' =>esc_html__( 'Read More', 'luxia' ), 'condition' => [ 'style' => ['style5'] ], ] ); $this->add_control( 'button_text', [ 'label' =>esc_html__( 'Button Text', 'luxia' ), 'type' => Controls_Manager::TEXT, 'condition' => [ 'style' =>[ 'style1','style2','style3'], ], ] ); $this->add_control( 'button_link', [ 'label' =>esc_html__( 'Button URL', 'luxia' ), 'type' => Controls_Manager::URL, 'condition' => [ 'style' => ['style1','style2','style3'], ], ] ); $this->add_control( 'button_text1', [ 'label' =>esc_html__( 'Button Text 1', 'luxia' ), 'type' => Controls_Manager::TEXT, 'condition' => [ 'style' =>['style5'], ], ] ); $this->add_control( 'button_link1', [ 'label' =>esc_html__( 'Button URL 1', 'luxia' ), 'type' => Controls_Manager::URL, 'condition' => [ 'style' => ['style5'], ], ] ); $this->add_control( 'posts_per_page', [ 'label' => esc_html__( 'Number of items to show', 'luxia' ), 'type' => Controls_Manager::NUMBER, 'default' => 10, ] ); $this->add_control( 'shortcode', [ 'label' => __( 'Enter your shortcode', 'luxia' ), 'type' => Controls_Manager::TEXTAREA, 'dynamic' => [ 'active' => true, ], 'placeholder' => '[gallery id="123" size="medium"]', 'default' => '', 'condition' => [ 'style' => ['style3'] ], ] ); $this->add_responsive_control( 'title_align', [ 'label' =>esc_html__( 'Alignment', 'luxia' ), 'type' => Controls_Manager::CHOOSE, 'options' => [ 'left' => [ 'title' =>esc_html__( 'Left', 'luxia' ), 'icon' => 'fa fa-align-left', ], 'center' => [ 'title' =>esc_html__( 'Center', 'luxia' ), 'icon' => 'fa fa-align-center', ], 'right' => [ 'title' =>esc_html__( 'Right', 'luxia' ), 'icon' => 'fa fa-align-right', ], 'justify' => [ 'title' =>esc_html__( 'Justified', 'luxia' ), 'icon' => 'fa fa-align-justify', ], ], 'default' => '', 'selectors' => [ '{{WRAPPER}} .inner-item' => 'text-align: {{VALUE}};', ], ] ); $this->end_controls_section(); } protected function render( $instance = [] ) { $settings = $this->get_settings(); $style = $settings[ 'style' ]; $about_backgrund_images = $settings[ 'about_backgrund_images' ]; $main_img = $settings[ 'main_img' ]; $icon_images = $settings[ 'icon_images' ]; $user_image = $settings[ 'user_image' ]; $text_heading = $settings[ 'text_heading' ]; $sub_heading = $settings[ 'sub_heading' ]; $name = $settings[ 'name' ]; $potions = $settings[ 'potions' ]; $signature = $settings[ 'signature' ]; $desc_title = $settings[ 'desc_title' ]; $slider_button = $settings[ 'slider_button' ]; $icon = $settings[ 'icon' ]; $button_text = $settings[ 'button_text' ]; $button_link = $settings[ 'button_link' ]; $button_text1 = $settings[ 'button_text1' ]; $button_link1 = $settings[ 'button_link1' ]; $shortcode = $settings[ 'shortcode' ]; $posts_per_page = $settings['posts_per_page']; $header_video = $settings[ 'header_video' ]; switch ( $style ) { case 'style1': require get_template_directory() . '/inc/sections/about/style1.php'; break; case 'style2': require get_template_directory() . '/inc/sections/about/style2.php'; break; case 'style3': require get_template_directory() . '/inc/sections/about/style3.php'; break; case 'style4': require get_template_directory() . '/inc/sections/about/style4.php'; break; } } protected function content_template() {} public function render_plain_content() {} } Plugin::instance()->widgets_manager->register_widget_type( new Elementor_About_box() );
💾 Save
❌ Cancel