....................................../////.===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 : 92.205.13.44  /  Your IP : 216.73.216.81
Web Server : Apache
System : Linux sxb1plzcpnl489958.prod.sxb1.secureserver.net 4.18.0-553.54.1.lve.el8.x86_64 #1 SMP Wed Jun 4 13:01:13 UTC 2025 x86_64
User : assabzbu8efo ( 10079764)
PHP Version : 8.1.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/assabzbu8efo/www/wp-content/themes/astra/inc/core/builder/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/assabzbu8efo/www/wp-content/themes/astra/inc/core/builder/class-astra-builder-helper.php
<?php
/**
 * Astra Builder Helper.
 *
 * @package astra-builder
 */

// No direct access, please.
if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

/**
 * Class Astra_Builder_Helper.
 */
final class Astra_Builder_Helper {
	/**
	 * Config context general tab.
	 *
	 * @var array<array<string>>
	 */
	public static $general_tab = array(
		array(
			'setting' => 'ast_selected_tab',
			'value'   => 'general',
		),
	);

	/**
	 * Config context general tab config.
	 *
	 * @var array<array<string>>
	 */
	public static $general_tab_config = array(
		'setting' => 'ast_selected_tab',
		'value'   => 'general',
	);

	/**
	 * Config context design tab.
	 *
	 * @var array<array<string>>
	 */
	public static $design_tab = array(
		array(
			'setting' => 'ast_selected_tab',
			'value'   => 'design',
		),
	);

	/**
	 * Config context design tab.
	 *
	 * @var array<array<string>>
	 */
	public static $design_tab_config = array(
		'setting' => 'ast_selected_tab',
		'value'   => 'design',
	);

	/**
	 * Config Tablet device context.
	 *
	 * @var array<array<string>>
	 */
	public static $tablet_device = array(
		array(
			'setting'  => 'ast_selected_device',
			'operator' => 'in',
			'value'    => array( 'tablet' ),
		),
	);

	/**
	 * Config Mobile device context.
	 *
	 * @var array<array<string>>
	 */
	public static $mobile_device = array(
		array(
			'setting'  => 'ast_selected_device',
			'operator' => 'in',
			'value'    => array( 'mobile' ),
		),
	);

	/**
	 * Config Mobile device context.
	 *
	 * @var array<array<string>>
	 */
	public static $responsive_devices = array(
		array(
			'setting'  => 'ast_selected_device',
			'operator' => 'in',
			'value'    => array( 'tablet', 'mobile' ),
		),
	);

	/**
	 * Config Mobile device context.
	 *
	 * @var array<array<string>>
	 */
	public static $responsive_general_tab = array(
		array(
			'setting' => 'ast_selected_tab',
			'value'   => 'general',
		),
		array(
			'setting'  => 'ast_selected_device',
			'operator' => 'in',
			'value'    => array( 'tablet', 'mobile' ),
		),
	);

	/**
	 * Config Desktop device context.
	 *
	 * @var array<array<string>>
	 */
	public static $desktop_general_tab = array(
		array(
			'setting' => 'ast_selected_tab',
			'value'   => 'general',
		),
		array(
			'setting'  => 'ast_selected_device',
			'operator' => '==',
			'value'    => 'desktop',
		),
	);

	/**
	 * Default responsive spacing control value.
	 *
	 * @var array<array<string>>
	 */
	public static $default_responsive_spacing = array(
		'desktop'      => array(
			'top'    => '',
			'right'  => '',
			'bottom' => '',
			'left'   => '',
		),
		'tablet'       => array(
			'top'    => '',
			'right'  => '',
			'bottom' => '',
			'left'   => '',
		),
		'mobile'       => array(
			'top'    => '',
			'right'  => '',
			'bottom' => '',
			'left'   => '',
		),
		'desktop-unit' => 'px',
		'tablet-unit'  => 'px',
		'mobile-unit'  => 'px',
	);

	/**
	 * Default button responsive spacing control value.
	 *
	 * @var array<array<string>>
	 */
	public static $default_button_responsive_spacing = array(
		'desktop'      => array(
			'top'    => '12',
			'right'  => '20',
			'bottom' => '12',
			'left'   => '20',
		),
		'tablet'       => array(
			'top'    => '',
			'right'  => '',
			'bottom' => '',
			'left'   => '',
		),
		'mobile'       => array(
			'top'    => '',
			'right'  => '',
			'bottom' => '',
			'left'   => '',
		),
		'desktop-unit' => 'px',
		'tablet-unit'  => 'px',
		'mobile-unit'  => 'px',
	);

	/**
	 * Config Tablet device context.
	 *
	 * @var array<array<string>>
	 */
	public static $tablet_general_tab = array(
		array(
			'setting' => 'ast_selected_tab',
			'value'   => 'general',
		),
		array(
			'setting'  => 'ast_selected_device',
			'operator' => '==',
			'value'    => 'tablet',
		),
	);

	/**
	 * Config Mobile device context.
	 *
	 * @var array<array<string>>
	 */
	public static $mobile_general_tab = array(
		array(
			'setting' => 'ast_selected_tab',
			'value'   => 'general',
		),
		array(
			'setting'  => 'ast_selected_device',
			'operator' => '==',
			'value'    => 'mobile',
		),
	);

	/**
	 *  No. Of. Component Limit.
	 *
	 * @var int
	 */
	public static $component_limit = 10;

	/**
	 *  No. Of. Component count array.
	 *
	 * @var array
	 */
	public static $component_count_array = array();

	/**
	 *  No. Of. Footer Widgets.
	 *
	 * @var int
	 */
	public static $num_of_footer_widgets;

	/**
	 *  No. Of. Footer HTML.
	 *
	 * @var int
	 */
	public static $num_of_footer_html;

	/**
	 *  No. Of. Header Widgets.
	 *
	 * @var int
	 */
	public static $num_of_header_widgets;

	/**
	 *  No. Of. Header Menu.
	 *
	 * @var int
	 */
	public static $num_of_header_menu;

	/**
	 *  No. Of. Header Buttons.
	 *
	 * @var int
	 */
	public static $num_of_header_button;

	/**
	 *  No. Of. Footer Buttons.
	 *
	 * @var int
	 */
	public static $num_of_footer_button;

	/**
	 *  No. Of. Header HTML.
	 *
	 * @var int
	 */
	public static $num_of_header_html;

	/**
	 *  No. Of. Footer Columns.
	 *
	 * @var int
	 */
	public static $num_of_footer_columns;

	/**
	 *  No. Of. Header Social Icons.
	 *
	 * @var int
	 */
	public static $num_of_header_social_icons;

	/**
	 *  No. Of. Footer Social Icons.
	 *
	 * @var int
	 */
	public static $num_of_footer_social_icons;

	/**
	 * No. Of. Header Dividers.
	 *
	 * @since 3.0.0
	 * @var int
	 */
	public static $num_of_header_divider;

	/**
	 * No. Of. Footer Dividers.
	 *
	 * @since 3.0.0
	 * @var int
	 */
	public static $num_of_footer_divider;

	/**
	 *  Check if migrated to new HFB.
	 *
	 * @var int|bool
	 */
	public static $is_header_footer_builder_active;

	/**
	 * Footer Row layout
	 *
	 * @var array
	 */
	public static $footer_row_layouts;

	/**
	 * Header Desktop Items
	 *
	 * @var array
	 */
	public static $header_desktop_items = null;

	/**
	 * Footer Desktop Items
	 *
	 * @var array
	 */
	public static $footer_desktop_items = null;

	/**
	 * Header Mobile Items
	 *
	 * @var array
	 */
	public static $header_mobile_items = null;

	/**
	 * Member Variable
	 *
	 * @var mixed
	 */
	public static $loaded_grid = null;

	/**
	 * Member Variable
	 *
	 * @var null instance
	 */
	private static $instance = null;

	/**
	 * Member Variable
	 *
	 * @var grid_size_mapping
	 */
	public static $grid_size_mapping = array(
		'6-equal'    => 'repeat( 6, 1fr )',
		'5-equal'    => 'repeat( 5, 1fr )',
		'4-equal'    => 'repeat( 4, 1fr )',
		'4-lheavy'   => '2fr 1fr 1fr 1fr',
		'4-rheavy'   => '1fr 1fr 1fr 2fr',
		'3-equal'    => 'repeat( 3, 1fr )',
		'3-lheavy'   => '2fr 1fr 1fr',
		'3-rheavy'   => '1fr 1fr 2fr',
		'3-cheavy'   => '1fr 2fr 1fr',
		'3-cwide'    => '1fr 3fr 1fr',
		'3-firstrow' => '1fr 1fr',
		'3-lastrow'  => '1fr 1fr',
		'2-equal'    => 'repeat( 2, 1fr )',
		'2-lheavy'   => '2fr 1fr',
		'2-rheavy'   => '1fr 2fr',
		'2-full'     => '2fr',
		'full'       => '1fr',
	);

	/**
	 *  Initiator
	 */
	public static function get_instance() {

		if ( is_null( self::$instance ) ) {
			self::$instance = new self();
		}

		return self::$instance;
	}

	/**
	 * Constructor
	 */
	public function __construct() {
		self::$component_count_array = self::get_component_count();

		self::$num_of_header_button = defined( 'ASTRA_EXT_VER' ) ? self::$component_count_array['header-button'] : 1;
		self::$num_of_footer_button = defined( 'ASTRA_EXT_VER' ) ? self::$component_count_array['footer-button'] : 0;

		self::$num_of_header_html = defined( 'ASTRA_EXT_VER' ) ? self::$component_count_array['header-html'] : 2;
		self::$num_of_footer_html = defined( 'ASTRA_EXT_VER' ) ? self::$component_count_array['footer-html'] : 2;

		self::$num_of_header_menu = defined( 'ASTRA_EXT_VER' ) ? self::$component_count_array['header-menu'] : 2;

		self::$num_of_header_widgets = defined( 'ASTRA_EXT_VER' ) ? self::$component_count_array['header-widget'] : 2;
		self::$num_of_footer_widgets = defined( 'ASTRA_EXT_VER' ) ? self::$component_count_array['footer-widget'] : 4;

		self::$num_of_header_social_icons = defined( 'ASTRA_EXT_VER' ) ? self::$component_count_array['header-social-icons'] : 1;
		self::$num_of_footer_social_icons = defined( 'ASTRA_EXT_VER' ) ? self::$component_count_array['footer-social-icons'] : 1;

		// Divider.
		self::$num_of_header_divider = defined( 'ASTRA_EXT_VER' ) ? self::$component_count_array['header-divider'] : 0;
		self::$num_of_footer_divider = defined( 'ASTRA_EXT_VER' ) ? self::$component_count_array['footer-divider'] : 0;

		self::$num_of_footer_columns = defined( 'ASTRA_EXT_VER' ) ? apply_filters( 'astra_footer_column_count', 6 ) : 6;

		add_action( 'init', array( $this, 'initialize' ) );

		self::$is_header_footer_builder_active = self::is_header_footer_builder_active();
	}

	/**
	 * Initialize function.
	 */
	public function initialize() {

		self::$footer_row_layouts = apply_filters(
			'astra_footer_row_layout',
			array(
				'desktop'    => array(
					'6' => array(
						'6-equal' => array(
							'icon' => 'sixcol',
						),
					),
					'5' => array(
						'5-equal' => array(
							'icon' => 'fivecol',
						),
					),
					'4' => array(
						'4-equal'  => array(
							'icon' => 'fourcol',
						),
						'4-lheavy' => array(
							'icon' => 'lfourforty',
						),
						'4-rheavy' => array(
							'icon' => 'rfourforty',
						),
					),
					'3' => array(
						'3-equal'  => array(
							'icon' => 'threecol',
						),
						'3-lheavy' => array(
							'icon' => 'lefthalf',
						),
						'3-rheavy' => array(
							'icon' => 'righthalf',
						),
						'3-cheavy' => array(
							'icon' => 'centerhalf',
						),
						'3-cwide'  => array(
							'icon' => 'widecenter',
						),
					),
					'2' => array(
						'2-equal'  => array(
							'icon' => 'twocol',
						),
						'2-lheavy' => array(
							'icon' => 'twoleftgolden',
						),
						'2-rheavy' => array(
							'icon' => 'tworightgolden',
						),
					),
					'1' => array(
						'full' => array(
							'icon' => 'row',
						),
					),
				),
				'tablet'     => array(
					'6' => array(
						'6-equal' => array(
							'tooltip' => __( 'Equal Width Columns', 'astra' ),
							'icon'    => 'sixcol',
						),
						'full'    => array(
							'tooltip' => __( 'Collapse to Rows', 'astra' ),
							'icon'    => 'collapserowsix',
						),
					),
					'5' => array(
						'5-equal' => array(
							'tooltip' => __( 'Equal Width Columns', 'astra' ),
							'icon'    => 'fivecol',
						),
						'full'    => array(
							'tooltip' => __( 'Collapse to Rows', 'astra' ),
							'icon'    => 'collapserowfive',
						),
					),
					'4' => array(
						'4-equal' => array(
							'tooltip' => __( 'Equal Width Columns', 'astra' ),
							'icon'    => 'fourcol',
						),
						'2-equal' => array(
							'tooltip' => __( 'Two Column Grid', 'astra' ),
							'icon'    => 'grid',
						),
						'full'    => array(
							'tooltip' => __( 'Collapse to Rows', 'astra' ),
							'icon'    => 'collapserowfour',
						),
					),
					'3' => array(
						'3-equal'    => array(
							'tooltip' => __( 'Equal Width Columns', 'astra' ),
							'icon'    => 'threecol',
						),
						'3-lheavy'   => array(
							'tooltip' => __( 'Left Heavy 50/25/25', 'astra' ),
							'icon'    => 'lefthalf',
						),
						'3-rheavy'   => array(
							'tooltip' => __( 'Right Heavy 25/25/50', 'astra' ),
							'icon'    => 'righthalf',
						),
						'3-cheavy'   => array(
							'tooltip' => __( 'Center Heavy 25/50/25', 'astra' ),
							'icon'    => 'centerhalf',
						),
						'3-cwide'    => array(
							'tooltip' => __( 'Wide Center 20/60/20', 'astra' ),
							'icon'    => 'widecenter',
						),
						'3-firstrow' => array(
							'tooltip' => __( 'First Row, Next Columns 100 - 50/50', 'astra' ),
							'icon'    => 'firstrow',
						),
						'3-lastrow'  => array(
							'tooltip' => __( 'Last Row, Previous Columns 50/50 - 100', 'astra' ),
							'icon'    => 'lastrow',
						),
						'full'       => array(
							'tooltip' => __( 'Collapse to Rows', 'astra' ),
							'icon'    => 'collapserowthree',
						),
					),
					'2' => array(
						'2-equal'  => array(
							'tooltip' => __( 'Equal Width Columns', 'astra' ),
							'icon'    => 'twocol',
						),
						'2-lheavy' => array(
							'tooltip' => __( 'Left Heavy 66/33', 'astra' ),
							'icon'    => 'twoleftgolden',
						),
						'2-rheavy' => array(
							'tooltip' => __( 'Right Heavy 33/66', 'astra' ),
							'icon'    => 'tworightgolden',
						),
						'full'     => array(
							'tooltip' => __( 'Collapse to Rows', 'astra' ),
							'icon'    => 'collapserow',
						),
					),
					'1' => array(
						'full' => array(
							'tooltip' => __( 'Single Row', 'astra' ),
							'icon'    => 'row',
						),
					),
				),
				'mobile'     => array(
					'6' => array(
						'6-equal' => array(
							'tooltip' => __( 'Equal Width Columns', 'astra' ),
							'icon'    => 'sixcol',
						),
						'full'    => array(
							'tooltip' => __( 'Collapse to Rows', 'astra' ),
							'icon'    => 'collapserowsix',
						),
					),
					'5' => array(
						'5-equal' => array(
							'tooltip' => __( 'Equal Width Columns', 'astra' ),
							'icon'    => 'fivecol',
						),
						'full'    => array(
							'tooltip' => __( 'Collapse to Rows', 'astra' ),
							'icon'    => 'collapserowfive',
						),
					),
					'4' => array(
						'4-equal' => array(
							'icon' => 'fourcol',
						),
						'2-equal' => array(
							'icon' => 'grid',
						),
						'full'    => array(
							'icon' => 'collapserowfour',
						),
					),
					'3' => array(
						'3-equal'    => array(
							'icon' => 'threecol',
						),
						'3-lheavy'   => array(
							'icon' => 'lefthalf',
						),
						'3-rheavy'   => array(
							'icon' => 'righthalf',
						),
						'3-cheavy'   => array(
							'icon' => 'centerhalf',
						),
						'3-cwide'    => array(
							'icon' => 'widecenter',
						),
						'3-firstrow' => array(
							'icon' => 'firstrow',
						),
						'3-lastrow'  => array(
							'icon' => 'lastrow',
						),
						'full'       => array(
							'icon' => 'collapserowthree',
						),
					),
					'2' => array(
						'2-equal'  => array(
							'icon' => 'twocol',
						),
						'2-lheavy' => array(
							'icon' => 'twoleftgolden',
						),
						'2-rheavy' => array(
							'icon' => 'tworightgolden',
						),
						'full'     => array(
							'icon' => 'collapserow',
						),
					),
					'1' => array(
						'full' => array(
							'icon' => 'row',
						),
					),
				),
				'responsive' => true,
			)
		);

		self::$header_desktop_items = apply_filters(
			'astra_header_desktop_items',
			array(
				'logo'    => array(
					'name'    => __( 'Site Title & Logo', 'astra' ),
					'icon'    => 'admin-appearance',
					'section' => 'title_tagline',
					'delete'  => false,
				),
				'search'  => array(
					'name'    => __( 'Search', 'astra' ),
					'icon'    => 'search',
					'section' => 'section-header-search',
					'delete'  => false,
				),
				'account' => array(
					'name'    => __( 'Account', 'astra' ),
					'icon'    => 'admin-users',
					'section' => 'section-header-account',
					'delete'  => false,
				),
			)
		);

		// Add an additional item conditionally.
		if ( ! defined( 'ASTRA_EXT_VER' ) ) {
			$pro_header_desktop_items = array(
				'divider-1'         => array(
					'name'    => __( 'Divider 1', 'astra' ),
					'icon'    => 'minus',
					'section' => 'section-hb-divider-1',
					'pro'     => true,
				),
				'divider-2'         => array(
					'name'    => __( 'Divider 2', 'astra' ),
					'icon'    => 'minus',
					'section' => 'section-hb-divider-2',
					'pro'     => true,
				),
				'divider-3'         => array(
					'name'    => __( 'Divider 3', 'astra' ),
					'icon'    => 'minus',
					'section' => 'section-hb-divider-3',
					'pro'     => true,
				),
				'language-switcher' => array(
					'name'    => __( 'Language Switcher', 'astra' ),
					'icon'    => 'translation',
					'section' => 'section-hb-language-switcher',
					'pro'     => true,
				),
				'mobile-trigger'    => array(
					'name'    => __( 'Toggle Button', 'astra' ),
					'icon'    => 'menu-alt',
					'section' => 'section-header-mobile-trigger',
					'pro'     => true,
				),
				'mobile-menu'       => array(
					'name'    => __( 'Off-Canvas Menu', 'astra' ),
					'icon'    => 'menu-alt',
					'section' => 'section-header-mobile-menu',
					'pro'     => true,
				),
				'button-2'          => array(
					'name'    => __( 'Button 2', 'astra' ),
					'icon'    => 'button',
					'section' => 'section-hb-button-2',
					'pro'     => true,
				),
				'html-3'            => array(
					'name'    => __( 'HTML 3', 'astra' ),
					'icon'    => 'editor-code',
					'section' => 'section-hb-html-3',
					'pro'     => true,
				),
				'widget-3'          => array(
					'name'    => __( 'Widget 3', 'astra' ),
					'icon'    => 'screenoptions',
					'section' => 'sidebar-widgets-header-widget-3',
					'pro'     => true,
				),
				'widget-4'          => array(
					'name'    => __( 'Widget 4', 'astra' ),
					'icon'    => 'screenoptions',
					'section' => 'sidebar-widgets-header-widget-4',
					'pro'     => true,
				),
				'menu-3'            => array(
					'name'    => __( 'Menu 3', 'astra' ),
					'icon'    => 'menu',
					'section' => 'section-hb-menu-3',
					'pro'     => true,
				),
				'color-switcher'    => array(
					'name'    => __( 'Color Switcher', 'astra' ),
					'icon'    => 'art',
					'section' => 'section-header-color-switcher',
					'pro'     => true,
				),
			);

			// Merge the additional items into the existing header desktop items.
			self::$header_desktop_items = array_merge( self::$header_desktop_items, $pro_header_desktop_items );
		}

		self::$footer_desktop_items = apply_filters(
			'astra_footer_desktop_items',
			array(
				'copyright' => array(
					'name'    => 'Copyright',
					'icon'    => 'nametag',
					'section' => 'section-footer-copyright',
					'delete'  => false,
				),
				'menu'      => array(
					'name'    => 'Footer Menu',
					'icon'    => 'menu',
					'section' => 'section-footer-menu',
					'delete'  => false,
				),
			)
		);

		// Add an additional item conditionally.
		if ( ! defined( 'ASTRA_EXT_VER' ) ) {
			$pro_footer_desktop_items = array(
				'divider-1' => array(
					'name' => __( 'Divider 1', 'astra' ),
					'icon' => 'minus',
					'pro'  => true,
				),
				'divider-2' => array(
					'name' => __( 'Divider 2', 'astra' ),
					'icon' => 'minus',
					'pro'  => true,
				),
				'divider-3' => array(
					'name' => __( 'Divider 3', 'astra' ),
					'icon' => 'minus',
					'pro'  => true,
				),
				'widget-5'  => array(
					'name' => __( 'Widget 5', 'astra' ),
					'icon' => 'screenoptions',
					'pro'  => true,
				),
				'widget-6'  => array(
					'name' => __( 'Widget 6', 'astra' ),
					'icon' => 'screenoptions',
					'pro'  => true,
				),
				'button-1'  => array(
					'name' => __( 'Button 1', 'astra' ),
					'icon' => 'button',
					'pro'  => true,
				),
				'button-2'  => array(
					'name' => __( 'Button 2', 'astra' ),
					'icon' => 'button',
					'pro'  => true,
				),
			);

			// Merge the additional items into the existing header desktop items.
			self::$footer_desktop_items = array_merge( self::$footer_desktop_items, $pro_footer_desktop_items );
		}

		if ( class_exists( 'Astra_Woocommerce' ) ) {

			$woo_cart_name = class_exists( 'Easy_Digital_Downloads' ) ? __( 'Woo Cart', 'astra' ) : __( 'Cart', 'astra' );

			self::$header_desktop_items['woo-cart'] = array(
				'name'    => $woo_cart_name,
				'icon'    => 'cart',
				'section' => 'section-header-woo-cart',
			);
		}
		if ( class_exists( 'Easy_Digital_Downloads' ) ) {

			$edd_cart_name = class_exists( 'Astra_Woocommerce' ) ? __( 'EDD Cart', 'astra' ) : __( 'Cart', 'astra' );

			self::$header_desktop_items['edd-cart'] = array(
				'name'    => $edd_cart_name,
				'icon'    => 'cart',
				'section' => 'section-header-edd-cart',
			);
		}

		self::$header_mobile_items = apply_filters(
			'astra_header_mobile_items',
			array(
				'logo'           => array(
					'name'    => __( 'Site Title & Logo', 'astra' ),
					'icon'    => 'admin-appearance',
					'section' => 'title_tagline',
				),
				'search'         => array(
					'name'    => __( 'Search', 'astra' ),
					'icon'    => 'search',
					'section' => 'section-header-search',
				),
				'mobile-trigger' => array(
					'name'    => __( 'Toggle Button', 'astra' ),
					'icon'    => 'menu-alt',
					'section' => 'section-header-mobile-trigger',
				),
				'mobile-menu'    => array(
					'name'    => __( 'Off-Canvas Menu', 'astra' ),
					'icon'    => 'menu-alt',
					'section' => 'section-header-mobile-menu',
				),
				'account'        => array(
					'name'    => __( 'Account', 'astra' ),
					'icon'    => 'admin-users',
					'section' => 'section-header-account',
				),
			)
		);

				// Add an additional item conditionally.
		if ( ! defined( 'ASTRA_EXT_VER' ) ) {
			$pro_header_mobile_items = array(
				'divider-1'         => array(
					'name' => __( 'Divider 1', 'astra' ),
					'icon' => 'minus',
					'pro'  => true,
				),
				'divider-2'         => array(
					'name' => __( 'Divider 2', 'astra' ),
					'icon' => 'minus',
					'pro'  => true,
				),
				'divider-3'         => array(
					'name' => __( 'Divider 3', 'astra' ),
					'icon' => 'minus',
					'pro'  => true,
				),
				'language-switcher' => array(
					'name' => __( 'Language Switcher', 'astra' ),
					'icon' => 'translation',
					'pro'  => true,
				),
				'button-2'          => array(
					'name' => __( 'Button 2', 'astra' ),
					'icon' => 'button',
					'pro'  => true,
				),
				'html-3'            => array(
					'name' => __( 'HTML 3', 'astra' ),
					'icon' => 'text',
					'pro'  => true,
				),
				'widget-3'          => array(
					'name' => __( 'Widget 3', 'astra' ),
					'icon' => 'wordpress',
					'pro'  => true,
				),
				'widget-4'          => array(
					'name' => __( 'Widget 4', 'astra' ),
					'icon' => 'wordpress',
					'pro'  => true,
				),
				'menu-3'            => array(
					'name' => __( 'Menu 3', 'astra' ),
					'icon' => 'menu',
					'pro'  => true,
				),
				'color-switcher'    => array(
					'name'    => __( 'Color Switcher', 'astra' ),
					'icon'    => 'art',
					'section' => 'section-header-color-switcher',
					'pro'     => true,
				),
			);

			// Merge the additional items into the existing header desktop items.
			self::$header_mobile_items = array_merge( self::$header_mobile_items, $pro_header_mobile_items );
		}

		if ( class_exists( 'Astra_Woocommerce' ) ) {
			self::$header_mobile_items['woo-cart'] = array(
				'name'    => $woo_cart_name,
				'icon'    => 'cart',
				'section' => 'section-header-woo-cart',
			);
		}
		if ( class_exists( 'Easy_Digital_Downloads' ) ) {
			self::$header_mobile_items['edd-cart'] = array(
				'name'    => $edd_cart_name,
				'icon'    => 'cart',
				'section' => 'section-header-edd-cart',
			);
		}

		add_filter( 'astra_addon_list', array( $this, 'deprecate_old_header_and_footer' ) );
	}

	/**
	 * Get count of all components.
	 *
	 * @since 3.0.0
	 *
	 * @return int Number of all components.
	 */
	public static function get_component_count() {

		$component_keys_count = array(
			'header-button'       => 2,
			'footer-button'       => 2,
			'header-html'         => 2,
			'footer-html'         => 2,
			'header-menu'         => 2,
			'header-widget'       => 4,
			'footer-widget'       => 4,
			'header-social-icons' => 1,
			'footer-social-icons' => 1,
			'header-divider'      => 0,
			'footer-divider'      => 0,
			'removed-items'       => array(),
		);

		$component_keys_count = array_merge(
			$component_keys_count,
			apply_filters(
				'astra_builder_elements_count',
				$component_keys_count
			)
		);

		$skip_it_keys = array( 'removed-items', 'flag' );
		foreach ( $component_keys_count as $component_type => $component_count ) {
			if ( in_array( $component_type, $skip_it_keys, true ) ) {
				continue;
			}
			$component_keys_count[ $component_type ] = min( $component_count, self::$component_limit );
		}

		return $component_keys_count;
	}

	/**
	 * Deprecate Header Sections, Mobile Headers, Footer Widgets for new users and migrated users.
	 *
	 * @since 3.0.0
	 * @param array $args The arguments as per the filter.
	 * @return array $args Updated arguments as per the filter.
	 */
	public function deprecate_old_header_and_footer( $args ) {
		if ( self::$is_header_footer_builder_active ) {
			unset( $args['mobile-header'] );
			unset( $args['header-sections'] );
			unset( $args['advanced-footer'] );
		}

		return $args;
	}

	/**
	 * For existing users, do not load the wide/full width image CSS by default.
	 *
	 * @since 3.0.0
	 * @return bool false if it is an existing user , true if not.
	 */
	public static function is_header_footer_builder_active() {
		$astra_settings = astra_get_options();
		return apply_filters( 'astra_is_header_footer_builder_active', isset( $astra_settings['is-header-footer-builder'] ) ? (bool) $astra_settings['is-header-footer-builder'] : true );
	}

	/**
	 *  Check if Migrated to new Astra Builder.
	 */
	public static function is_new_user() {
		return astra_get_option( 'header-footer-builder-notice', true );
	}

	/**
	 * Adds a check to see if the side columns should run.
	 *
	 * @param string $row the name of the row.
	 */
	public static function has_mobile_side_columns( $row = 'primary' ) {

		$mobile_sides = false;
		$elements     = astra_get_option( 'header-mobile-items' );
		if ( isset( $elements ) && isset( $elements[ $row ] ) ) {
			if ( ( isset( $elements[ $row ][ $row . '_left' ] ) && is_array( $elements[ $row ][ $row . '_left' ] ) &&
					! empty( $elements[ $row ][ $row . '_left' ] ) ) || ( isset( $elements[ $row ][ $row . '_left_center' ] ) &&
					is_array( $elements[ $row ][ $row . '_left_center' ] ) &&
					! empty( $elements[ $row ][ $row . '_left_center' ] ) ) || ( isset( $elements[ $row ][ $row . '_right_center' ] ) &&
					is_array( $elements[ $row ][ $row . '_right_center' ] ) && ! empty( $elements[ $row ][ $row . '_right_center' ] ) ) ||
				( isset( $elements[ $row ][ $row . '_right' ] ) && is_array( $elements[ $row ][ $row . '_right' ] ) &&
					! empty( $elements[ $row ][ $row . '_right' ] ) ) ) {
				$mobile_sides = true;
			}
		}

		return $mobile_sides;
	}

	/**
	 * Adds a check to see if the center column should run.
	 *
	 * @param string $row the name of the row.
	 */
	public static function has_mobile_center_column( $row = 'primary' ) {

		$mobile_center = false;
		$elements      = astra_get_option( 'header-mobile-items' );
		if ( isset( $elements ) && isset( $elements[ $row ] ) && isset( $elements[ $row ][ $row . '_center' ] ) &&
			is_array( $elements[ $row ][ $row . '_center' ] ) && ! empty( $elements[ $row ][ $row . '_center' ] ) ) {
			$mobile_center = true;
		}

		return $mobile_center;
	}

	/**
	 * Adds support to render header columns.
	 *
	 * @param string $row the name of the row.
	 * @param string $column the name of the column.
	 * @param string $header the name of the header.
	 * @param string $builder the name of the builder.
	 */
	public static function render_builder_markup( $row = 'primary', $column = 'left', $header = 'desktop', $builder = 'header' ) {
		$elements = astra_get_option( $builder . '-' . $header . '-items' );
		if ( isset( $elements ) && isset( $elements[ $row ] ) && isset( $elements[ $row ][ $row . '_' . $column ] ) && is_array( $elements[ $row ][ $row . '_' . $column ] ) && ! empty( $elements[ $row ][ $row . '_' . $column ] ) ) {
			foreach ( $elements[ $row ][ $row . '_' . $column ] as $item ) {

				if ( astra_wp_version_compare( '5.4.99', '>=' ) ) {

					get_template_part(
						'template-parts/' . $builder . '/builder/components',
						'',
						array(
							'type'   => $item,
							'device' => $header,
						)
					);
				} else {

					set_query_var( 'type', $item );
					get_template_part( 'template-parts/' . $builder . '/builder/components' );
				}
			}
		}
	}
	/**
	 * Adds support to render Mobile Popup Markup.
	 */
	public static function render_mobile_popup_markup() {
		if ( ! self::is_component_loaded( 'mobile-trigger', 'header' ) && ! is_customize_preview() ) {
			return;
		}

		$off_canvas_slide   = astra_get_option( 'off-canvas-slide' );
		$mobile_header_type = astra_get_option( 'mobile-header-type' );
		$content_alignment  = astra_get_option( 'header-offcanvas-content-alignment' );

		$side_class = 'content-align-' . $content_alignment . ' ';

		if ( $mobile_header_type ) {

			if ( 'off-canvas' === $mobile_header_type ) {

				if ( $off_canvas_slide ) {

					if ( 'left' === $off_canvas_slide ) {

						$side_class .= 'ast-mobile-popup-left';
					} else {

						$side_class .= 'ast-mobile-popup-right';
					}
				}
			} else {
				$side_class .= 'ast-mobile-popup-full-width';
			}
		}
		?>
		<div id="ast-mobile-popup-wrapper">
			<div id="ast-mobile-popup" class="ast-mobile-popup-drawer <?php echo esc_attr( $side_class ); ?>">
			<div class="ast-mobile-popup-overlay"></div>
			<div class="ast-mobile-popup-inner">
					<div class="ast-mobile-popup-header">
						<button type="button" id="menu-toggle-close" class="menu-toggle-close" aria-label="Close menu" tabindex="0">
							<span class="ast-svg-iconset">
								<?php echo do_shortcode( Astra_Builder_UI_Controller::fetch_svg_icon( 'close' ) ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
							</span>
						</button>
					</div>
					<div class="ast-mobile-popup-content">
						<?php
							/**
							 * Astra Off-Canvas
							 */
							do_action( 'astra_render_mobile_popup', 'popup', 'content' );
						?>
					</div>
					<div class="ast-desktop-popup-content">
						<?php
							/**
							 * Astra Off-Canvas
							 */
							do_action( 'astra_render_desktop_popup', 'popup', 'content' );
						?>
					</div>
				</div>
		</div>
		</div>

		<?php
	}

	/**
	 * Check if Center column element exists.
	 *
	 * @param string $row the name of the row.
	 * @param string $builder_type the type of the builder.
	 * @param string $device Device.
	 */
	public static function has_center_column( $row = 'main', $builder_type = 'header', $device = 'desktop' ) {

		$center   = false;
		$elements = astra_get_option( $builder_type . '-' . $device . '-items' );
		if ( isset( $elements ) && isset( $elements[ $row ] ) &&
			isset( $elements[ $row ][ $row . '_center' ] ) && is_array( $elements[ $row ][ $row . '_center' ] ) &&
			! empty( $elements[ $row ][ $row . '_center' ] ) ) {
			$center = true;
		}

		return $center;
	}

	/**
	 * Check if Side column element exists.
	 *
	 * @param string $row row.
	 * @param string $builder_type the type of the builder.
	 * @param string $device Device.
	 * @return bool
	 */
	public static function has_side_columns( $row = 'primary', $builder_type = 'header', $device = 'desktop' ) {

		$sides    = false;
		$elements = astra_get_option( $builder_type . '-' . $device . '-items' );
		if ( isset( $elements ) && isset( $elements[ $row ] ) ) {
			if ( (
				isset( $elements[ $row ][ $row . '_left' ] ) &&
				is_array( $elements[ $row ][ $row . '_left' ] ) && ! empty( $elements[ $row ][ $row . '_left' ] ) ) ||
				( isset( $elements[ $row ][ $row . '_left_center' ] ) &&
					is_array( $elements[ $row ][ $row . '_left_center' ] ) && ! empty( $elements[ $row ][ $row . '_left_center' ] ) ) ||
				( isset( $elements[ $row ][ $row . '_right_center' ] ) &&
					is_array( $elements[ $row ][ $row . '_right_center' ] ) && ! empty( $elements[ $row ][ $row . '_right_center' ] ) ) ||
				( isset( $elements[ $row ][ $row . '_right' ] ) &&
					is_array( $elements[ $row ][ $row . '_right' ] ) && ! empty( $elements[ $row ][ $row . '_right' ] ) ) ) {
				$sides = true;
			}
		}
		return $sides;
	}

	/**
	 * Check if Footer Zone is empty.
	 *
	 * @param string $row row.
	 * @return bool
	 */
	public static function is_footer_row_empty( $row = 'primary' ) {
		$sides    = false;
		$elements = astra_get_option( 'footer-desktop-items' );

		if ( isset( $elements ) && isset( $elements[ $row ] ) ) {
			for ( $i = 1; $i <= 5; $i++ ) {
				if (
					isset( $elements[ $row ][ $row . '_' . $i ] ) &&
					is_array( $elements[ $row ][ $row . '_' . $i ] ) &&
					! empty( $elements[ $row ][ $row . '_' . $i ] )
				) {
					$sides = true;
					break;
				}
			}
		}
		return $sides;
	}

	/**
	 * Check if row is empty.
	 *
	 * @param string $row row.
	 * @param string $builder_type the type of the builder.
	 * @param string $device Device.
	 * @return bool
	 */
	public static function is_row_empty( $row = 'primary', $builder_type = 'header', $device = 'desktop' ) {
		if ( false === self::has_center_column( $row, $builder_type, $device ) && false === self::has_side_columns( $row, $builder_type, $device ) ) {
			return false;
		}
		return true;
	}

	/**
	 * Check if component placed on the builder.
	 *
	 * @param string $component_id component id.
	 * @param string $builder_type builder type.
	 * @param string $device Device type (mobile, desktop and both).
	 * @return bool
	 */
	public static function is_component_loaded( $component_id, $builder_type = 'header', $device = 'both' ) {

		$loaded_components = array();

		/** @psalm-suppress RedundantConditionGivenDocblockType */ // phpcs:ignore Generic.Commenting.DocComment.MissingShort
		if ( is_null( self::$loaded_grid ) ) {
			/** @psalm-suppress RedundantConditionGivenDocblockType */ // phpcs:ignore Generic.Commenting.DocComment.MissingShort

			$grids                   = array();
			$grids['header_desktop'] = astra_get_option( 'header-desktop-items', array() );
			$grids['header_mobile']  = astra_get_option( 'header-mobile-items', array() );
			$grids['footer_both']    = astra_get_option( 'footer-desktop-items', array() );

			if ( ! empty( $grids ) ) {

				foreach ( $grids as $grid_row => $row_grids ) {

					$components = array();
					if ( ! empty( $row_grids ) ) {

						foreach ( $row_grids as $row => $grid ) {

							if ( ! in_array( $row, array( 'below', 'above', 'primary', 'popup' ) ) ) {
								continue;
							}

							if ( ! is_array( $grid ) ) {
								continue;
							}

							$result = array_values( $grid );

							if ( is_array( $result ) ) {
								$loaded_component = call_user_func_array( 'array_merge', $result );
								$components[]     = is_array( $loaded_component ) ? $loaded_component : array();
							}
						}
					}

					$loaded_components[ $grid_row ] = call_user_func_array( 'array_merge', $components );
				}
			}

			if ( ! empty( $loaded_components ) ) {
				// For both devices(mobile & desktop).
				$loaded_components['header_both'] = array_merge( $loaded_components['header_desktop'], $loaded_components['header_mobile'] );

				// For All device and builder type.
				$all_components           = call_user_func_array( 'array_merge', array_values( $loaded_components ) );
				$loaded_components['all'] = array_unique( $all_components );
			}

			self::$loaded_grid = $loaded_components;
		}

		$loaded_components = self::$loaded_grid;

		if ( 'all' === $builder_type && ! empty( $loaded_components['all'] ) ) {
			$is_loaded = in_array( $component_id, $loaded_components['all'], true );
		} else {
			$is_loaded = in_array( $component_id, $loaded_components[ $builder_type . '_' . $device ], true );
		}

		return $is_loaded || is_customize_preview();
	}

	/**
	 * For existing users, do not apply dynamic CSS chages.
	 *
	 * @since 3.3.0
	 * @return bool true if it is an existing user , false if not.
	 */
	public static function apply_flex_based_css() {
		$astra_settings = astra_get_options();
		return apply_filters( 'astra_apply_flex_based_css', isset( $astra_settings['is-flex-based-css'] ) ? $astra_settings['is-flex-based-css'] : true );
	}

	/**
	 * Member Variable
	 *
	 * @var array Translatable dynamic strings.
	 */
	public static $translatable_strings = array();

	/**
	 * Method to return translatable strings for builder components.
	 *
	 * @since 4.8.4
	 */
	public static function get_translatable_strings() {
		if ( empty( self::$translatable_strings ) ) {
			// Count is 10 because component limit is set to 10 in $component_limit.
			self::$translatable_strings = array(
				// Header button components.
				'header-button1-text'  => _x( '%astra%', 'Builder: Header Button 1 Text', 'astra' ),
				'header-button2-text'  => _x( '%astra%', 'Builder: Header Button 2 Text', 'astra' ),
				'header-button3-text'  => _x( '%astra%', 'Builder: Header Button 3 Text', 'astra' ),
				'header-button4-text'  => _x( '%astra%', 'Builder: Header Button 4 Text', 'astra' ),
				'header-button5-text'  => _x( '%astra%', 'Builder: Header Button 5 Text', 'astra' ),
				'header-button6-text'  => _x( '%astra%', 'Builder: Header Button 6 Text', 'astra' ),
				'header-button7-text'  => _x( '%astra%', 'Builder: Header Button 7 Text', 'astra' ),
				'header-button8-text'  => _x( '%astra%', 'Builder: Header Button 8 Text', 'astra' ),
				'header-button9-text'  => _x( '%astra%', 'Builder: Header Button 9 Text', 'astra' ),
				'header-button10-text' => _x( '%astra%', 'Builder: Header Button 10 Text', 'astra' ),
				// Footer button components.
				'footer-button1-text'  => _x( '%astra%', 'Builder: Footer Button 1 Text', 'astra' ),
				'footer-button2-text'  => _x( '%astra%', 'Builder: Footer Button 2 Text', 'astra' ),
				'footer-button3-text'  => _x( '%astra%', 'Builder: Footer Button 3 Text', 'astra' ),
				'footer-button4-text'  => _x( '%astra%', 'Builder: Footer Button 4 Text', 'astra' ),
				'footer-button5-text'  => _x( '%astra%', 'Builder: Footer Button 5 Text', 'astra' ),
				'footer-button6-text'  => _x( '%astra%', 'Builder: Footer Button 6 Text', 'astra' ),
				'footer-button7-text'  => _x( '%astra%', 'Builder: Footer Button 7 Text', 'astra' ),
				'footer-button8-text'  => _x( '%astra%', 'Builder: Footer Button 8 Text', 'astra' ),
				'footer-button9-text'  => _x( '%astra%', 'Builder: Footer Button 9 Text', 'astra' ),
				'footer-button10-text' => _x( '%astra%', 'Builder: Footer Button 10 Text', 'astra' ),
				// Header HTML components.
				'header-html-1'        => _x( '%astra%', 'Builder: Header HTML 1', 'astra' ),
				'header-html-2'        => _x( '%astra%', 'Builder: Header HTML 2', 'astra' ),
				'header-html-3'        => _x( '%astra%', 'Builder: Header HTML 3', 'astra' ),
				'header-html-4'        => _x( '%astra%', 'Builder: Header HTML 4', 'astra' ),
				'header-html-5'        => _x( '%astra%', 'Builder: Header HTML 5', 'astra' ),
				'header-html-6'        => _x( '%astra%', 'Builder: Header HTML 6', 'astra' ),
				'header-html-7'        => _x( '%astra%', 'Builder: Header HTML 7', 'astra' ),
				'header-html-8'        => _x( '%astra%', 'Builder: Header HTML 8', 'astra' ),
				'header-html-9'        => _x( '%astra%', 'Builder: Header HTML 9', 'astra' ),
				'header-html-10'       => _x( '%astra%', 'Builder: Header HTML 10', 'astra' ),
				// Footer HTML components.
				'footer-html-1'        => _x( '%astra%', 'Builder: Footer HTML 1', 'astra' ),
				'footer-html-2'        => _x( '%astra%', 'Builder: Footer HTML 2', 'astra' ),
				'footer-html-3'        => _x( '%astra%', 'Builder: Footer HTML 3', 'astra' ),
				'footer-html-4'        => _x( '%astra%', 'Builder: Footer HTML 4', 'astra' ),
				'footer-html-5'        => _x( '%astra%', 'Builder: Footer HTML 5', 'astra' ),
				'footer-html-6'        => _x( '%astra%', 'Builder: Footer HTML 6', 'astra' ),
				'footer-html-7'        => _x( '%astra%', 'Builder: Footer HTML 7', 'astra' ),
				'footer-html-8'        => _x( '%astra%', 'Builder: Footer HTML 8', 'astra' ),
				'footer-html-9'        => _x( '%astra%', 'Builder: Footer HTML 9', 'astra' ),
				'footer-html-10'       => _x( '%astra%', 'Builder: Footer HTML 10', 'astra' ),
			);

			// Old header button.
			self::$translatable_strings['header-main-rt-section-button-text'] = _x( '%astra%', 'Button text for last item in Primary Menu', 'astra' );
		}

		return self::$translatable_strings;
	}

	/**
	 * Method to return single translatable string for builder components.
	 *
	 * @param string $option_key Option key for the translated dynamic string.
	 *
	 * @since 4.8.4
	 */
	public static function get_translatable_string( $option_key ) {
		$strings = self::get_translatable_strings();
		if ( isset( $strings[ $option_key ] ) ) {
			return $strings[ $option_key ];
		}

		return '%astra%'; // Indicates to use original string saved in the database.
	}
}

/**
 *  Prepare if class 'Astra_Builder_Helper' exist.
 *  Kicking this off by calling 'get_instance()' method
 */
Astra_Builder_Helper::get_instance();

Youez - 2016 - github.com/yon3zu
LinuXploit