Sid Gifari File Manager
🏠 Root
/
home
/
ailwtbdh
/
lynchestinegroup.com
/
wp-content
/
plugins
/
koncrete-core_2
/
elementor
/
background-image
/
Editing: class.php
<?php /** * @author RadiusTheme * @since 1.0 * @version 1.0 */ namespace radiustheme\Koncrete_Core; use Elementor\Controls_Manager; if ( ! defined( 'ABSPATH' ) ) exit; class Background_Image extends Custom_Widget_Base { public function __construct( $data = array(), $args = null ){ $this->rt_name = esc_html__( 'Background Image', 'koncrete-core' ); $this->rt_base = 'rt-background-image'; parent::__construct( $data, $args ); } public function rt_fields(){ $fields = array( array( 'mode' => 'section_start', 'id' => 'sec_general', 'label' => esc_html__( 'General', 'koncrete-core' ), ), array( 'type' => Controls_Manager::MEDIA, 'id' => 'bg_image', 'label' => __( 'Image', 'koncrete-core' ), 'description' => __( 'Upload Your image', 'koncrete-core' ), ), array( 'type' => Controls_Manager::SLIDER, 'mode' => 'responsive', 'id' => 'bg_height', 'label' => __( 'Background container Height', 'koncrete-core' ), 'size_units' => array( 'px', '%' ), 'range' => array( 'px' => array( 'min' => 0, 'max' => 2000, ), '%' => array( 'min' => 0, 'max' => 100, ), ), 'default' => array( 'unit' => '%', 'size' => 100, ), 'selectors' => array( '{{WRAPPER}} .rtel-background-image' => 'height: {{SIZE}}{{UNIT}};', ) ), array( 'type' => Controls_Manager::SLIDER, 'mode' => 'responsive', 'id' => 'bg_width', 'label' => __( 'Background container width', 'koncrete-core' ), 'size_units' => array( 'px', '%' ), 'range' => array( 'px' => array( 'min' => 0, 'max' => 2000, ), '%' => array( 'min' => 0, 'max' => 100, ), ), 'default' => array( 'unit' => '%', 'size' => 100, ), 'selectors' => array( '{{WRAPPER}} .rtel-background-image' => 'width: {{SIZE}}{{UNIT}};', ) ), array( 'type' => Controls_Manager::SELECT2, 'mode' => 'responsive', 'id' => 'bg_repeat', 'label' => esc_html__( 'Background Repeat', 'koncrete-core' ), 'options' => array( 'repeat' => esc_html__( 'repeat', 'koncrete-core' ), 'repeat-x' => esc_html__( 'repeat-x', 'koncrete-core' ), 'repeat-y' => esc_html__( 'repeat-y', 'koncrete-core' ), 'no-repeat' => esc_html__( 'no-repeat', 'koncrete-core' ), 'initial' => esc_html__( 'initial', 'koncrete-core' ), 'inherit' => esc_html__( 'inherit', 'koncrete-core' ), ), 'default' => 'repeat', 'selectors' => array( '{{WRAPPER}} .rtel-background-image' => 'background-repeat: {{VALUE}};', ) ), array( 'type' => Controls_Manager::COLOR, 'mode' => 'responsive', 'id' => 'bg_color', 'label' => esc_html__( 'Background Color', 'koncrete-core' ), 'default' => 'transparent', 'selectors' => array( '{{WRAPPER}} .rtel-background-image' => 'background-color: {{VALUE}}' ), ), array( 'type' => Controls_Manager::TEXT, 'mode' => 'responsive', 'id' => 'bg_size', 'description' => "background-size: auto|length(300px 100px)|cover|contain|initial|inherit", 'label' => esc_html__( 'Background Size', 'koncrete-core' ), 'default' => 'auto', 'selectors' => array( '{{WRAPPER}} .rtel-background-image' => 'background-size: {{VALUE}}' ), ), array( 'type' => Controls_Manager::TEXT, 'mode' => 'responsive', 'id' => 'bg_position', 'description' => "background-position: xpos ypos", 'label' => esc_html__( 'Background Position', 'koncrete-core' ), 'default' => '0% 0%', 'selectors' => array( '{{WRAPPER}} .rtel-background-image' => 'background-position: {{VALUE}}' ), ), array( 'type' => Controls_Manager::SELECT2, 'id' => 'bg_attachment', 'mode' => 'responsive', 'label' => esc_html__( 'Background Attachment', 'koncrete-core' ), 'options' => array( 'scroll' => esc_html__( 'scroll', 'koncrete-core' ), 'fixed' => esc_html__( 'fixed', 'koncrete-core' ), 'local' => esc_html__( 'local', 'koncrete-core' ), 'initial' => esc_html__( 'initial', 'koncrete-core' ), 'inherit' => esc_html__( 'inherit', 'koncrete-core' ), ), 'default' => 'scroll', 'description' => "background-attachment: scroll|fixed|local|initial|inherit;", 'selectors' => array( '{{WRAPPER}} .rtel-background-image' => 'background-attachment: {{VALUE}}' ), ), array( 'mode' => 'section_end', ), ); return $fields; } protected function render() { $data = $this->get_settings(); $template = 'view'; return $this->rt_template( $template, $data ); } }
Save
Cancel