remove_control( 'address' ); $default_address = __( 'London Eye, London, United Kingdom', 'airi' ); $controls->add_control( 'address', [ 'label' => __( 'Address', 'airi' ), 'type' => \Elementor\Controls_Manager::TEXT, 'condition' => [ '_skin' => '', ], 'placeholder' => $default_address, 'default' => $default_address, 'label_block' => true, ] ); } public function register_skin_controls( $controls ) { $controls->add_control( 'important_note', [ 'label' => '' . __( 'Note', 'airi' ) . '', 'condition' => [ '_skin' => $this->get_id(), ], 'type' => \Elementor\Controls_Manager::RAW_HTML, 'raw' => sprintf( __( 'Please go here %s to find the latitude and longitute for your address.', 'airi' ), '' . __( 'here', 'airi' ) . ''), 'content_classes' => 'your-class', ] ); $controls->add_control( 'api_key', [ 'label' => __( 'API key', 'airi' ), 'type' => \Elementor\Controls_Manager::TEXT, 'condition' => [ '_skin' => $this->get_id(), ], 'description' => sprintf( __( 'Please go here %s to get your Google Maps API Key.', 'airi' ), '' . __( 'here', 'airi' ) . ''), 'placeholder' => '', 'default' => '', 'label_block' => true, ] ); $controls->add_control( 'lat', [ 'label' => __( 'Latitude', 'airi' ), 'type' => \Elementor\Controls_Manager::TEXT, 'condition' => [ '_skin' => $this->get_id(), ], 'placeholder' => '', 'default' => '40.712775', 'label_block' => true, ] ); $controls->add_control( 'long', [ 'label' => __( 'Longitude', 'airi' ), 'type' => \Elementor\Controls_Manager::TEXT, 'condition' => [ '_skin' => $this->get_id(), ], 'placeholder' => '', 'default' => '-74.005973', 'label_block' => true, ] ); $controls->add_control( 'marker', [ 'label' => __( 'Marker', 'airi' ), 'type' => \Elementor\Controls_Manager::TEXT, 'condition' => [ '_skin' => $this->get_id(), ], 'placeholder' => '', 'default' => get_stylesheet_directory_uri() . '/images/icon.png', 'label_block' => true, ] ); } public function render() { $settings = $this->parent->get_settings(); if ( empty( $settings['address'] ) ) { return; } if ( 0 === absint( $settings['zoom']['size'] ) ) { $settings['zoom']['size'] = 10; } ?>
add_skin( new Airi_Google_Maps_Skin( $widget ) ); } );