HEX
Server: Apache
System: Linux webm003.cluster111.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: assotraipi (849654)
PHP: 5.4.45
Disabled: _dyuweyrj4,_dyuweyrj4r,dl
Upload Files
File: /home/assotraipi/www/wp-content/plugins/wp-google-maps/includes/open-layers/class.ol-loader.php
<?php

namespace WPGMZA;

if(!defined('ABSPATH'))
	return;

/**
 * Loads the OpenLayers map engine
 */
class OLLoader
{
	private static $olAPILoadCalled = false;
	
	/**
	 * Enqueue scripts
	 * @return void
	 */
	public function enqueueScripts()
	{
		global $wpgmza;
		
		$this->loadOpenLayers();
	}
	
	/**
	 * Loads the OpenLayers libraries and styles
	 */
	public function loadOpenLayers()
	{
		global $wpgmza;
		
		//if(Plugin::$settings->remove_api)
			//return;
		
		if(OLLoader::$olAPILoadCalled)
			return;
		
		wp_enqueue_style('wpgmza-ol-base-style', plugin_dir_url(dirname(__DIR__)) . 'lib/ol.css');
		wp_enqueue_style('wpgmza-ol-style', plugin_dir_url(dirname(__DIR__)) . 'css/open-layers.css');
		
		// TODO: Fix this, don't use this handle, use wpgmza_api_call. For some reason it won't enqueue using that. I suspect something else is using this handle. Whatever it is isn't in wpGoogleMaps.php
		// NB: Removed ol-debug.js to save 2.6MB space
		//if($wpgmza->isInDeveloperMode() || defined('SCRIPT_DEBUG'))
			//wp_enqueue_script('wpgmza_ol_api_call', plugin_dir_url(dirname(__DIR__)) . 'lib/ol-debug.js');
		//else
		wp_enqueue_script('wpgmza_ol_api_call', plugin_dir_url(dirname(__DIR__)) . 'lib/ol.js');
	}
}