HEX
Server: Apache
System: Linux webd006.cluster128.gra.hosting.ovh.net 6.18.42-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Wed Aug 5 15:59:48 CEST 2026 x86_64
User: zwafgyp (177615)
PHP: 7.4.33
Disabled: _dyuweyrj4,_dyuweyrj4r,dl
Upload Files
File: /home/zwafgyp/dodolodge-net/wp-content/themes/hotel-wp/inc/widgets/google-map/config.php
<?php
/**
 * Thim_Builder Google Map config class
 *
 * @version     1.0.0
 * @author      ThimPress
 * @package     Thim_Builder/Classes
 * @category    Classes
 * @author      Thimpress, tuanta
 */

/**
 * Prevent loading this file directly
 */
defined( 'ABSPATH' ) || exit;

if ( ! class_exists( 'Thim_Builder_Config_Google_Map' ) ) {
	/**
	 * Class Thim_Builder_Config_Google_Map
	 */
	class Thim_Builder_Config_Google_Map extends Thim_Builder_Abstract_Config {

		/**
		 * Thim_Builder_Config_Google_Map constructor.
		 */
		public function __construct() {
			// info
			self::$base = 'google-map';
			self::$name = esc_html__( 'Thim: Google Map', 'hotel-wp' );
			self::$desc = esc_html__( 'Add Google Map', 'hotel-wp' );
			self::$icon = 'thim-widget-icon thim-widget-icon-timetable';

			parent::__construct();
		}

		/**
		 * @return array
		 */
		public function get_options() {

			// options
			return array(
				array(
					'type'        => 'dropdown',
					'admin_label' => true,
					'heading'     => esc_html__( 'Google map Options', 'hotel-wp' ),
					'param_name'  => 'map_options',
					'value'       => array(
						esc_html__( 'Use API', 'hotel-wp' )        => 'api',
						esc_html__( 'Use Map Iframe', 'hotel-wp' ) => 'iframe',
					),
				),
				// Map center
				array(
					'type'        => 'textfield',
					'heading'     => esc_html__( 'Map center', 'hotel-wp' ),
					'param_name'  => 'map_center',
					'admin_label' => true,
					'value'       => esc_html__( 'Center St Newton Center, Boston, United States', 'hotel-wp' ),
					'description' => esc_html__( 'The name of a place, town, city, or even a country. Can be an exact address too.', 'hotel-wp' ),

				),
				// API
				array(
					'type'        => 'textfield',
					'admin_label' => true,
					'heading'     => esc_html__( 'Google Map API Key', 'hotel-wp' ),
					'param_name'  => 'api_key',
					'description' => sprintf( 'Enter your Google Map API Key. <a href="%1$s" target="_blank" >Get an API Key</a>', esc_url( 'https://developers.google.com/maps/documentation/javascript/get-api-key#get-an-api-key' ) ),
					'dependency'  => array(
						'element' => 'map_options',
						'value'   => 'api',
					),
				),
				// Map height
				array(
					'type'        => 'number',
					'admin_label' => true,
					'heading'     => esc_html__( 'Height', 'hotel-wp' ),
					'param_name'  => 'height',
					'min'         => 0,
					'value'       => 480,
					'suffix'      => 'px',
					'description' => esc_html__( 'Height of the map.', 'hotel-wp' ),
				),

				// Zoom options
				array(
					'type'        => 'number',
					'admin_label' => true,
					'heading'     => esc_html__( 'Zoom level', 'hotel-wp' ),
					'param_name'  => 'zoom',
					'min'         => 0,
					'max'         => 21,
					'value'       => 12,
					'description' => esc_html__( 'A value from 0 (the world) to 21 (street level).', 'hotel-wp' ),
				),

				// Show marker
				array(
					'type'        => 'checkbox',
					'heading'     => esc_html__( 'Marker', 'hotel-wp' ),
					'param_name'  => 'marker_at_center',
					'description' => esc_html__( 'Show marker at map center.', 'hotel-wp' ),
					'dependency'  => array(
						'element' => 'map_options',
						'value'   => 'api',
					),
				),

				// Get marker
				array(
					'type'        => 'attach_image',
					'heading'     => esc_html__( 'Choose marker icon', 'hotel-wp' ),
					'param_name'  => 'marker_icon',
					'admin_label' => true,
					'value'       => '',
					'description' => esc_html__( 'Replaces the default map marker with your own image.', 'hotel-wp' ),
					'dependency'  => array( 'element' => 'marker_at_center', 'value' => array( 'true' ) ),
					'dependency'  => array(
						'element' => 'map_options',
						'value'   => 'api',
					),
				),

				// Other options
				array(
					'type'        => 'checkbox',
					'heading'     => esc_html__( 'Scroll to zoom', 'hotel-wp' ),
					'param_name'  => 'scroll_zoom',
					'description' => esc_html__( 'Allow scrolling over the map to zoom in or out.', 'hotel-wp' ),
					'dependency'  => array(
						'element' => 'map_options',
						'value'   => 'api',
					),
				),

				// Other options
				array(
					'type'        => 'checkbox',
					'heading'     => esc_html__( 'Draggable', 'hotel-wp' ),
					'param_name'  => 'draggable',
					'description' => esc_html__( 'Allow dragging the map to move it around.', 'hotel-wp' ),
					'dependency'  => array(
						'element' => 'map_options',
						'value'   => 'api',
					),
				),

				// Cover image
				array(
					'type'        => 'checkbox',
					'heading'     => esc_html__( 'Use Cover', 'hotel-wp' ),
					'param_name'  => 'map_cover',
					'description' => esc_html__( 'Show image cover before load google map. (optimzie speed load page)', 'hotel-wp' ),
					'value'       => false,
					'dependency'  => array(
						'element' => 'map_options',
						'value'   => 'api',
					),
				),

				// Get Cover image
				array(
					'type'        => 'attach_image',
					'heading'     => esc_html__( 'Choose cover image', 'hotel-wp' ),
					'param_name'  => 'map_cover_image',
					'admin_label' => true,
					'value'       => '',
					'dependency'  => array( 'element' => 'map_cover', 'value' => array( 'true' ) )
				),

				// Style
				array(
					'type'        => 'dropdown',
					'admin_label' => true,
					'heading'     => esc_html__( 'Map Style', 'hotel-wp' ),
					'param_name'  => 'map_style',
					'value'       => array(
						esc_html__( 'Default', 'hotel-wp' )                 => 'default',
						esc_html__( 'Ultra Light with Labels', 'hotel-wp' ) => 'light',
					),
					'dependency'  => array(
						'element' => 'map_options',
						'value'   => 'api',
					),
				),

			);
		}

		public function get_template_name(){
			return 'default';
		}
	}
}