Sid Gifari File Manager
🏠 Root
/
home
/
ailwtbdh
/
lynchestinegroup.com
/
wp-content
/
plugins
/
koncrete-core_2
/
elementor
/
google-map
/
Editing: class.php
<?php /** * @author RadiusTheme * @since 1.0 * @version 1.0 */ namespace radiustheme\Koncrete_Core; use Elementor\Controls_Manager; use Elementor\Group_Control_Background; use Elementor\Group_Control_Typography; if ( ! defined( 'ABSPATH' ) ) exit; class Google_Map extends Custom_Widget_Base { public function __construct( $data = array(), $args = null ){ $this->rt_name = esc_html__( 'Google Map', 'koncrete-core' ); $this->rt_base = 'rt-google-map'; 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::SELECT2, 'id' => 'style', 'label' => esc_html__( 'Layout Style', 'koncrete-core' ), 'options' => array( 'style1' => esc_html__( 'style 1 (Map only)', 'koncrete-core' ), 'style2' => esc_html__( 'style 2 (With Contact info)', 'koncrete-core' ), ), 'default' => 'style1', ), array( 'type' => Controls_Manager::TEXTAREA, 'id' => 'iframe', 'label' => esc_html__( 'Google Map Code', 'koncrete-core' ), 'default' => '', 'description' => sprintf( esc_html__( 'To create your own google map, follow the steps below:. Step 1: Visit %s. Step 2: Search for a location using the search bar of the top-left corner. Step 3: After you find the location, click on the "Share" icon from the left panel. Step 4: A popup will come up. From there go to the "Embed map" tab. You will find your Google Map code. Copy and paste this code in here', 'koncrete-core' ), '<a href="https://www.google.com/maps" target="_blank">https://www.google.com/maps</a>' ), ), array( 'type' => Controls_Manager::SLIDER, 'id' => 'height', 'label' => esc_html__( 'Height', 'koncrete-core' ), 'range' => array( 'px' => array( 'min' => 40, 'max' => 1000, ), ), 'default' => array( 'unit' => 'px', 'size' => 500, ), 'selectors' => array( '{{WRAPPER}} iframe' => 'height: {{SIZE}}{{UNIT}}' ), ), array( 'type' => Controls_Manager::TEXT, 'id' => 'title', 'label' => esc_html__( 'Title', 'koncrete-core' ), 'default' => 'Get in Touch With Us', 'condition' => array( 'style' => array( 'style2' ) ), ), array( 'type' => Controls_Manager::TEXTAREA, 'id' => 'subtitle', 'label' => esc_html__( 'Sub Text', 'koncrete-core' ), 'default' => 'Nulla magnam exercitationem cup iditate ab maxime.', 'condition' => array( 'style' => array( 'style2' ) ), ), array( 'type' => Controls_Manager::TEXTAREA, 'id' => 'address', 'label' => esc_html__( 'Address', 'koncrete-core' ), 'default' => "Gardening, 199 Rebecaer St, Victoria, USA", 'condition' => array( 'style' => array( 'style2' ) ), ), array( 'type' => Controls_Manager::TEXT, 'id' => 'phone', 'label' => esc_html__( 'Phone', 'koncrete-core' ), 'default' => '+003434343', 'condition' => array( 'style' => array( 'style2' ) ), ), array( 'type' => Controls_Manager::TEXT, 'id' => 'email', 'label' => esc_html__( 'Email', 'koncrete-core' ), 'default' => 'hello@koncrete.com', 'condition' => array( 'style' => array( 'style2' ) ), ), array( 'type' => Controls_Manager::TEXT, 'id' => 'fax', 'label' => esc_html__( 'Fax', 'koncrete-core' ), 'default' => '+ (123) 6969 8008', 'condition' => array( 'style' => array( 'style2' ) ), ), array( 'mode' => 'section_end', ), // Title Style array( 'mode' => 'section_start', 'id' => 'title_style', 'label' => esc_html__( 'Title Style', 'koncrete-core' ), 'tab' => Controls_Manager::TAB_STYLE, 'condition' => array( 'style' => array( 'style2', ) ), ), array( 'mode' => 'group', 'type' => Group_Control_Typography::get_type(), 'name' => 'title_typo', 'label' => esc_html__( 'Title Typography', 'koncrete-core' ), 'selector' => ' {{WRAPPER}} .rt-el-google-map-2 .contact-info .item-title, {{WRAPPER}} noselector, {{WRAPPER}} noselector, {{WRAPPER}} noselector ', ), array( 'type' => Controls_Manager::COLOR, 'id' => 'title_color', 'label' => esc_html__( 'Title Color', 'koncrete-core' ), 'selectors' => array( '{{WRAPPER}} .rt-el-google-map-2 .contact-info .item-title' => 'color: {{VALUE}}', '{{WRAPPER}} noselector' => 'color: {{VALUE}}', '{{WRAPPER}} noselector' => 'color: {{VALUE}}', ), ), array( 'type' => Controls_Manager::DIMENSIONS, 'size_units' => array( 'px', '%', 'em' ), 'id' => 'title_content_margin', 'label' => __( 'Title Margin', 'koncrete-core' ), 'selectors' => array( '{{WRAPPER}} .rt-el-google-map-2 .contact-info .item-title' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}} !important;', '{{WRAPPER}} noselector' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}} !important;', '{{WRAPPER}} noselector' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}} !important;', ), 'separator' => 'before', ), array( 'mode' => 'section_end', ), // Subtitle Style array( 'mode' => 'section_start', 'id' => 'subtitle_style', 'label' => esc_html__( 'Subtitle Style', 'koncrete-core' ), 'tab' => Controls_Manager::TAB_STYLE, 'condition' => array( 'style' => array( 'style2', ) ), ), array( 'mode' => 'group', 'type' => Group_Control_Typography::get_type(), 'name' => 'subtitle_typo', 'label' => esc_html__( 'Subtitle Typography', 'koncrete-core' ), 'selector' => ' {{WRAPPER}} .rt-el-google-map-2 .contact-info p, {{WRAPPER}} noselector, {{WRAPPER}} noselector, {{WRAPPER}} noselector ', ), array( 'type' => Controls_Manager::COLOR, 'id' => 'subtitle_color', 'label' => esc_html__( 'Subtitle Color', 'koncrete-core' ), 'selectors' => array( '{{WRAPPER}} .rt-el-google-map-2 .contact-info p' => 'color: {{VALUE}}', '{{WRAPPER}} noselector' => 'color: {{VALUE}}', '{{WRAPPER}} noselector' => 'color: {{VALUE}}', ), ), array( 'type' => Controls_Manager::DIMENSIONS, 'size_units' => array( 'px', '%', 'em' ), 'id' => 'subtitle_content_margin', 'label' => __( 'Subtitle Margin', 'koncrete-core' ), 'selectors' => array( '{{WRAPPER}} .rt-el-google-map-2 .contact-info p' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}} !important;', '{{WRAPPER}} noselector' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}} !important;', '{{WRAPPER}} noselector' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}} !important;', ), 'separator' => 'before', ), array( 'mode' => 'section_end', ), // Text Style array( 'mode' => 'section_start', 'id' => 'text_style', 'label' => esc_html__( 'Text Style', 'koncrete-core' ), 'tab' => Controls_Manager::TAB_STYLE, 'condition' => array( 'style' => array( 'style2', ) ), ), array( 'mode' => 'group', 'type' => Group_Control_Typography::get_type(), 'name' => 'text_typo', 'label' => esc_html__( 'Text Typography', 'koncrete-core' ), 'selector' => ' {{WRAPPER}} .rt-el-google-map-2 .contact-info .contact-method li, {{WRAPPER}} noselector, {{WRAPPER}} noselector, {{WRAPPER}} noselector ', ), array( 'type' => Controls_Manager::COLOR, 'id' => 'text_color', 'label' => esc_html__( 'Text Color', 'koncrete-core' ), 'selectors' => array( '{{WRAPPER}} .rt-el-google-map-2 .contact-info .contact-method li' => 'color: {{VALUE}}', '{{WRAPPER}} noselector' => 'color: {{VALUE}}', '{{WRAPPER}} noselector' => 'color: {{VALUE}}', ), ), array( 'type' => Controls_Manager::DIMENSIONS, 'size_units' => array( 'px', '%', 'em' ), 'id' => 'text_content_margin', 'label' => __( 'Text Margin', 'koncrete-core' ), 'selectors' => array( '{{WRAPPER}} .rt-el-google-map-2 .contact-info .contact-method li' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}} !important;', '{{WRAPPER}} noselector' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}} !important;', '{{WRAPPER}} noselector' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}} !important;', ), 'separator' => 'before', ), array( 'type' => Controls_Manager::DIMENSIONS, 'size_units' => array( 'px', '%', 'em' ), 'id' => 'text_content_padding', 'label' => __( 'Text padding', 'koncrete-core' ), 'selectors' => array( '{{WRAPPER}} .rt-el-google-map-2 .contact-info .contact-method li' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}} !important;', '{{WRAPPER}} noselector' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}} !important;', '{{WRAPPER}} noselector' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}} !important;', ), 'separator' => 'before', ), array( 'mode' => 'section_end', ), array( 'mode' => 'section_start', 'id' => 'icon_style', 'label' => esc_html__( 'Icon Style', 'koncrete-core' ), 'tab' => Controls_Manager::TAB_STYLE, 'condition' => array( 'style' => array( 'style2', ) ), ), array( 'type' => Controls_Manager::COLOR, 'id' => 'icon_color', 'label' => esc_html__( 'Icon Color', 'koncrete-core' ), 'selectors' => array( '{{WRAPPER}} .rt-el-google-map-2 .contact-info .contact-method li i' => 'color: {{VALUE}}', ), ), array( 'type' => Controls_Manager::SLIDER, 'mode' => 'responsive', 'id' => 'icon_size', 'label' => __( 'Icon Size', 'koncrete-core' ), 'size_units' => array('px',), 'range' => array( 'px' => array( 'min' => 0, 'max' => 75, ), ), 'selectors' => array( '{{WRAPPER}} .rt-el-google-map-2 .contact-info .contact-method li i' => 'font-size: {{SIZE}}{{UNIT}};', ) ), array( 'type' => Controls_Manager::SLIDER, 'mode' => 'responsive', 'id' => 'icon_position_left', 'label' => __( 'Icon offset left', 'koncrete-core' ), 'size_units' => array('px',), 'range' => array( 'px' => array( 'min' => -30, 'max' => 50, ), ), 'selectors' => array( '{{WRAPPER}} .rt-el-google-map-2 .contact-info .contact-method li i' => 'left: {{SIZE}}{{UNIT}};', ) ), array( 'type' => Controls_Manager::SLIDER, 'mode' => 'responsive', 'id' => 'icon_position_top', 'label' => __( 'Icon offset top', 'koncrete-core' ), 'size_units' => array('px',), 'range' => array( 'px' => array( 'min' => -30, 'max' => 50, ), ), 'selectors' => array( '{{WRAPPER}} .rt-el-google-map-2 .contact-info .contact-method li i' => 'top: {{SIZE}}{{UNIT}};', ) ), array( 'mode' => 'section_end', ), array( 'mode' => 'section_start', 'id' => 'others_style', 'label' => esc_html__( 'Others', 'koncrete-core' ), 'tab' => Controls_Manager::TAB_STYLE, ), array( 'mode' => 'group', 'separator' => 'before', 'label_block' => true, 'type' => Group_Control_Background::get_type(), 'name' => 'Address_block_background', 'types' => array( 'classic', 'gradient', ), 'fields_options' => array( 'background' => array( 'label' => esc_html__( 'Contact Block Background', 'koncrete-core' ), ), ), 'selector' => ' {{WRAPPER}} .rt-el-google-map-2 .contact-info, {{WRAPPER}} noselector ', ), array( 'type' => Controls_Manager::SLIDER, 'mode' => 'responsive', 'id' => 'contact_block_width', 'label' => __( 'Contact Block width', 'koncrete-core' ), 'size_units' => array('px', '%'), 'range' => array( 'px' => array( 'min' => 0, 'max' => 500, ), ), 'selectors' => array( '{{WRAPPER}} .rt-el-google-map-2 .contact-info' => 'width: {{SIZE}}{{UNIT}};', ) ), array( 'mode' => 'section_end', ), ); return $fields; } protected function render() { $data = $this->get_settings(); switch ( $data['style'] ) { case 'style2': $template = 'view-2'; break; default: $template = 'view-1'; break; } return $this->rt_template( $template, $data ); } }
Save
Cancel