....................................../////.===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.19.154.92  /  Your IP : 216.73.216.47
Web Server : Apache
System : Linux lon12.onrocket.com 4.18.0-513.9.1.lve.el8.x86_64 #1 SMP Mon Dec 4 15:01:22 UTC 2023 x86_64
User : gd5hzp4 ( 1069)
PHP Version : 7.4.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/gd5hzp4/www/wp-content/plugins/advanced-custom-fields/includes/admin/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/gd5hzp4/www/wp-content/plugins/advanced-custom-fields/includes/admin/admin-field-group.php
<?php

/*
*  ACF Admin Field Group Class
*
*  All the logic for editing a field group
*
*  @class       acf_admin_field_group
*  @package     ACF
*  @subpackage  Admin
*/

if ( ! class_exists( 'acf_admin_field_group' ) ) :

	class acf_admin_field_group {


		/*
		*  __construct
		*
		*  This function will setup the class functionality
		*
		*  @type    function
		*  @date    5/03/2014
		*  @since   5.0.0
		*
		*  @param   n/a
		*  @return  n/a
		*/

		function __construct() {

			// actions
			add_action( 'current_screen', array( $this, 'current_screen' ) );
			add_action( 'save_post', array( $this, 'save_post' ), 10, 2 );

			// ajax
			add_action( 'wp_ajax_acf/field_group/render_field_settings', array( $this, 'ajax_render_field_settings' ) );
			add_action( 'wp_ajax_acf/field_group/render_location_rule', array( $this, 'ajax_render_location_rule' ) );
			add_action( 'wp_ajax_acf/field_group/move_field', array( $this, 'ajax_move_field' ) );

			// filters
			add_filter( 'post_updated_messages', array( $this, 'post_updated_messages' ) );
			add_filter( 'use_block_editor_for_post_type', array( $this, 'use_block_editor_for_post_type' ), 10, 2 );
		}

		/**
		 *  use_block_editor_for_post_type
		 *
		 *  Prevents the block editor from loading when editing an ACF field group.
		 *
		 *  @date    7/12/18
		 *  @since   5.8.0
		 *
		 *  @param   bool   $use_block_editor Whether the post type can be edited or not. Default true.
		 *  @param   string $post_type The post type being checked.
		 *  @return  bool
		 */
		function use_block_editor_for_post_type( $use_block_editor, $post_type ) {
			if ( $post_type === 'acf-field-group' ) {
				return false;
			}
			return $use_block_editor;
		}

		/*
		*  post_updated_messages
		*
		*  This function will customize the message shown when editing a field group
		*
		*  @type    action (post_updated_messages)
		*  @date    30/04/2014
		*  @since   5.0.0
		*
		*  @param   $messages (array)
		*  @return  $messages
		*/

		function post_updated_messages( $messages ) {

			// append to messages
			$messages['acf-field-group'] = array(
				0  => '', // Unused. Messages start at index 1.
				1  => __( 'Field group updated.', 'acf' ),
				2  => __( 'Field group updated.', 'acf' ),
				3  => __( 'Field group deleted.', 'acf' ),
				4  => __( 'Field group updated.', 'acf' ),
				5  => false, // field group does not support revisions
				6  => __( 'Field group published.', 'acf' ),
				7  => __( 'Field group saved.', 'acf' ),
				8  => __( 'Field group submitted.', 'acf' ),
				9  => __( 'Field group scheduled for.', 'acf' ),
				10 => __( 'Field group draft updated.', 'acf' ),
			);

			// return
			return $messages;
		}


		/*
		*  current_screen
		*
		*  This function is fired when loading the admin page before HTML has been rendered.
		*
		*  @type    action (current_screen)
		*  @date    21/07/2014
		*  @since   5.0.0
		*
		*  @param   n/a
		*  @return  n/a
		*/

		function current_screen() {

			// validate screen
			if ( ! acf_is_screen( 'acf-field-group' ) ) {
				return;
			}

			// disable filters to ensure ACF loads raw data from DB
			acf_disable_filters();

			// enqueue scripts
			acf_enqueue_scripts();

			// actions
			add_action( 'acf/input/admin_enqueue_scripts', array( $this, 'admin_enqueue_scripts' ) );
			add_action( 'acf/input/admin_head', array( $this, 'admin_head' ) );
			add_action( 'acf/input/form_data', array( $this, 'form_data' ) );
			add_action( 'acf/input/admin_footer', array( $this, 'admin_footer' ) );

			// filters
			add_filter( 'acf/input/admin_l10n', array( $this, 'admin_l10n' ) );
		}


		/*
		*  admin_enqueue_scripts
		*
		*  This action is run after post query but before any admin script / head actions.
		*  It is a good place to register all actions.
		*
		*  @type    action (admin_enqueue_scripts)
		*  @date    30/06/2014
		*  @since   5.0.0
		*
		*  @param   n/a
		*  @return  n/a
		*/

		function admin_enqueue_scripts() {

			// no autosave
			wp_dequeue_script( 'autosave' );

			// custom scripts
			wp_enqueue_style( 'acf-field-group' );
			wp_enqueue_script( 'acf-field-group' );

			// localize text
			acf_localize_text(
				array(
					'The string "field_" may not be used at the start of a field name' => __( 'The string "field_" may not be used at the start of a field name', 'acf' ),
					'This field cannot be moved until its changes have been saved' => __( 'This field cannot be moved until its changes have been saved', 'acf' ),
					'Field group title is required' => __( 'Field group title is required', 'acf' ),
					'Move to trash. Are you sure?'  => __( 'Move to trash. Are you sure?', 'acf' ),
					'No toggle fields available'    => __( 'No toggle fields available', 'acf' ),
					'Move Custom Field'             => __( 'Move Custom Field', 'acf' ),
					'Checked'                       => __( 'Checked', 'acf' ),
					'(no label)'                    => __( '(no label)', 'acf' ),
					'(this field)'                  => __( '(this field)', 'acf' ),
					'copy'                          => __( 'copy', 'acf' ),
					'or'                            => __( 'or', 'acf' ),
					'Show this field group if'      => __( 'Show this field group if', 'acf' ),
					'Null'                          => __( 'Null', 'acf' ),

					// Conditions
					'Has any value'                 => __( 'Has any value', 'acf' ),
					'Has no value'                  => __( 'Has no value', 'acf' ),
					'Value is equal to'             => __( 'Value is equal to', 'acf' ),
					'Value is not equal to'         => __( 'Value is not equal to', 'acf' ),
					'Value matches pattern'         => __( 'Value matches pattern', 'acf' ),
					'Value contains'                => __( 'Value contains', 'acf' ),
					'Value is greater than'         => __( 'Value is greater than', 'acf' ),
					'Value is less than'            => __( 'Value is less than', 'acf' ),
					'Selection is greater than'     => __( 'Selection is greater than', 'acf' ),
					'Selection is less than'        => __( 'Selection is less than', 'acf' ),

					// Pro-only fields
					'Repeater (Pro only)'           => __( 'Repeater (Pro only)', 'acf' ),
					'Flexibly Content (Pro only)'   => __( 'Flexible Content (Pro only)', 'acf' ),
					'Clone (Pro only)'              => __( 'Clone (Pro only)', 'acf' ),
					'Gallery (Pro only)'            => __( 'Gallery (Pro only)', 'acf' ),
				)
			);

			// localize data
			acf_localize_data(
				array(
					'fieldTypes' => acf_get_field_types_info(),
				)
			);

			// 3rd party hook
			do_action( 'acf/field_group/admin_enqueue_scripts' );

		}


		/*
		*  admin_head
		*
		*  This function will setup all functionality for the field group edit page to work
		*
		*  @type    action (admin_head)
		*  @date    23/06/12
		*  @since   3.1.8
		*
		*  @param   $post_id (int)
		*  @return  $post_id (int)
		*/

		function admin_head() {

			// global
			global $post, $field_group;

			// set global var
			$field_group = acf_get_field_group( $post->ID );

			// metaboxes
			add_meta_box( 'acf-field-group-fields', __( 'Fields', 'acf' ), array( $this, 'mb_fields' ), 'acf-field-group', 'normal', 'high' );
			add_meta_box( 'acf-field-group-locations', __( 'Location', 'acf' ), array( $this, 'mb_locations' ), 'acf-field-group', 'normal', 'high' );
			add_meta_box( 'acf-field-group-options', __( 'Settings', 'acf' ), array( $this, 'mb_options' ), 'acf-field-group', 'normal', 'high' );

			// actions
			add_action( 'post_submitbox_misc_actions', array( $this, 'post_submitbox_misc_actions' ), 10, 0 );
			add_action( 'edit_form_after_title', array( $this, 'edit_form_after_title' ), 10, 0 );

			// filters
			add_filter( 'screen_settings', array( $this, 'screen_settings' ), 10, 1 );

			// 3rd party hook
			do_action( 'acf/field_group/admin_head' );

		}


		/*
		*  edit_form_after_title
		*
		*  This action will allow ACF to render metaboxes after the title
		*
		*  @type    action
		*  @date    17/08/13
		*
		*  @param   n/a
		*  @return  n/a
		*/

		function edit_form_after_title() {

			// globals
			global $post;

			// render post data
			acf_form_data(
				array(
					'screen'        => 'field_group',
					'post_id'       => $post->ID,
					'delete_fields' => 0,
					'validation'    => 0,
				)
			);

		}


		/*
		*  form_data
		*
		*  This function will add extra HTML to the acf form data element
		*
		*  @type    function
		*  @date    31/05/2016
		*  @since   5.3.8
		*
		*  @param   n/a
		*  @return  n/a
		*/

		function form_data( $args ) {

			// do action
			do_action( 'acf/field_group/form_data', $args );

		}


		/*
		*  admin_l10n
		*
		*  This function will append extra l10n strings to the acf JS object
		*
		*  @type    function
		*  @date    31/05/2016
		*  @since   5.3.8
		*
		*  @param   $l10n (array)
		*  @return  $l10n
		*/

		function admin_l10n( $l10n ) {
			return apply_filters( 'acf/field_group/admin_l10n', $l10n );
		}



		/*
		*  admin_footer
		*
		*  description
		*
		*  @type    function
		*  @date    11/01/2016
		*  @since   5.3.2
		*
		*  @param   $post_id (int)
		*  @return  $post_id (int)
		*/

		function admin_footer() {

			// 3rd party hook
			do_action( 'acf/field_group/admin_footer' );

		}


		/*
		*  screen_settings
		*
		*  description
		*
		*  @type    function
		*  @date    26/01/13
		*  @since   3.6.0
		*
		*  @param   $current (string)
		*  @return  $current
		*/

		function screen_settings( $html ) {

			// vars
			$checked = acf_get_user_setting( 'show_field_keys' ) ? 'checked="checked"' : '';

			// append
			$html .= '<div id="acf-append-show-on-screen" class="acf-hidden">';
			$html .= '<label for="acf-field-key-hide"><input id="acf-field-key-hide" type="checkbox" value="1" name="show_field_keys" ' . $checked . ' /> ' . __( 'Field Keys', 'acf' ) . '</label>';
			$html .= '</div>';

			// return
			return $html;

		}


		/*
		*  post_submitbox_misc_actions
		*
		*  This function will customize the publish metabox
		*
		*  @type    function
		*  @date    17/07/2015
		*  @since   5.2.9
		*
		*  @param   n/a
		*  @return  n/a
		*/

		function post_submitbox_misc_actions() {
			global $field_group;
			$status_label = $field_group['active'] ? _x( 'Active', 'post status', 'acf' ) : _x( 'Disabled', 'post status', 'acf' );

			?>
<script type="text/javascript">
(function($) {
	$('#post-status-display').html( '<?php echo esc_html( $status_label ); ?>' );
})(jQuery);	
</script>
			<?php
		}


		/*
		*  save_post
		*
		*  This function will save all the field group data
		*
		*  @type    function
		*  @date    23/06/12
		*  @since   1.0.0
		*
		*  @param   $post_id (int)
		*  @return  $post_id (int)
		*/

		function save_post( $post_id, $post ) {

			// do not save if this is an auto save routine
			if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) {
				return $post_id;
			}

			// bail early if not acf-field-group
			if ( $post->post_type !== 'acf-field-group' ) {
				return $post_id;
			}

			// only save once! WordPress save's a revision as well.
			if ( wp_is_post_revision( $post_id ) ) {
				return $post_id;
			}

			// verify nonce
			if ( ! acf_verify_nonce( 'field_group' ) ) {
				return $post_id;
			}

			// Bail early if request came from an unauthorised user.
			if ( ! current_user_can( acf_get_setting( 'capability' ) ) ) {
				return $post_id;
			}

			// disable filters to ensure ACF loads raw data from DB
			acf_disable_filters();

			// save fields
			if ( ! empty( $_POST['acf_fields'] ) ) {

				// loop
				foreach ( $_POST['acf_fields'] as $field ) {

					// vars
					$specific = false;
					$save     = acf_extract_var( $field, 'save' );

					// only saved field if has changed
					if ( $save == 'meta' ) {
						$specific = array(
							'menu_order',
							'post_parent',
						);
					}

					// set parent
					if ( ! $field['parent'] ) {
						$field['parent'] = $post_id;
					}

					// save field
					acf_update_field( $field, $specific );

				}
			}

			// delete fields
			if ( $_POST['_acf_delete_fields'] ) {

				// clean
				$ids = explode( '|', $_POST['_acf_delete_fields'] );
				$ids = array_map( 'intval', $ids );

				// loop
				foreach ( $ids as $id ) {

					// bai early if no id
					if ( ! $id ) {
						continue;
					}

					// delete
					acf_delete_field( $id );

				}
			}

			// add args
			$_POST['acf_field_group']['ID']    = $post_id;
			$_POST['acf_field_group']['title'] = $_POST['post_title'];

			// save field group
			acf_update_field_group( $_POST['acf_field_group'] );

			// return
			return $post_id;
		}


		/*
		*  mb_fields
		*
		*  This function will render the HTML for the medtabox 'acf-field-group-fields'
		*
		*  @type    function
		*  @date    28/09/13
		*  @since   5.0.0
		*
		*  @param   N/A
		*  @return  N/A
		*/

		function mb_fields() {

			// global
			global $field_group;

			// get fields
			$view = array(
				'fields' => acf_get_fields( $field_group ),
				'parent' => 0,
			);

			// load view
			acf_get_view( 'field-group-fields', $view );

		}


		/*
		*  mb_options
		*
		*  This function will render the HTML for the medtabox 'acf-field-group-options'
		*
		*  @type    function
		*  @date    28/09/13
		*  @since   5.0.0
		*
		*  @param   N/A
		*  @return  N/A
		*/

		function mb_options() {

			// global
			global $field_group;

			// field key (leave in for compatibility)
			if ( ! acf_is_field_group_key( $field_group['key'] ) ) {

				$field_group['key'] = uniqid( 'group_' );

			}

			// view
			acf_get_view( 'field-group-options' );

		}


		/*
		*  mb_locations
		*
		*  This function will render the HTML for the medtabox 'acf-field-group-locations'
		*
		*  @type    function
		*  @date    28/09/13
		*  @since   5.0.0
		*
		*  @param   N/A
		*  @return  N/A
		*/

		function mb_locations() {

			// global
			global $field_group;

			// UI needs at lease 1 location rule
			if ( empty( $field_group['location'] ) ) {

				$field_group['location'] = array(

					// group 0
					array(

						// rule 0
						array(
							'param'    => 'post_type',
							'operator' => '==',
							'value'    => 'post',
						),
					),

				);
			}

			// view
			acf_get_view( 'field-group-locations' );

		}


		/*
		*  ajax_render_location_rule
		*
		*  This function can be accessed via an AJAX action and will return the result from the render_location_value function
		*
		*  @type    function (ajax)
		*  @date    30/09/13
		*  @since   5.0.0
		*
		*  @param   n/a
		*  @return  n/a
		*/

		function ajax_render_location_rule() {

			// validate
			if ( ! acf_verify_ajax() ) {
				die();
			}

			// verify user capability
			if ( ! acf_current_user_can_admin() ) {
				die();
			}

			// validate rule
			$rule = acf_validate_location_rule( $_POST['rule'] );

			// view
			acf_get_view(
				'html-location-rule',
				array(
					'rule' => $rule,
				)
			);

			// die
			die();
		}


		/*
		*  ajax_render_field_settings
		*
		*  This function will return HTML containing the field's settings based on it's new type
		*
		*  @type    function (ajax)
		*  @date    30/09/13
		*  @since   5.0.0
		*
		*  @param   n/a
		*  @return  n/a
		*/

		function ajax_render_field_settings() {

			// validate
			if ( ! acf_verify_ajax() ) {
				die();
			}

			// verify user capability
			if ( ! acf_current_user_can_admin() ) {
				die();
			}

			// vars
			$field = acf_maybe_get_POST( 'field' );

			// check
			if ( ! $field ) {
				die();
			}

			// set prefix
			$field['prefix'] = acf_maybe_get_POST( 'prefix' );

			// validate
			$field = acf_get_valid_field( $field );

			// render
			do_action( "acf/render_field_settings/type={$field['type']}", $field );

			// return
			die();

		}

		/*
		*  ajax_move_field
		*
		*  description
		*
		*  @type    function
		*  @date    20/01/2014
		*  @since   5.0.0
		*
		*  @param   $post_id (int)
		*  @return  $post_id (int)
		*/

		function ajax_move_field() {

			// disable filters to ensure ACF loads raw data from DB
			acf_disable_filters();

			$args = acf_parse_args(
				$_POST,
				array(
					'nonce'          => '',
					'post_id'        => 0,
					'field_id'       => 0,
					'field_group_id' => 0,
				)
			);

			// verify nonce
			if ( ! wp_verify_nonce( $args['nonce'], 'acf_nonce' ) ) {
				die();
			}

			// verify user capability
			if ( ! acf_current_user_can_admin() ) {
				die();
			}

			// confirm?
			if ( $args['field_id'] && $args['field_group_id'] ) {

				// vars
				$field       = acf_get_field( $args['field_id'] );
				$field_group = acf_get_field_group( $args['field_group_id'] );

				// update parent
				$field['parent'] = $field_group['ID'];

				// remove conditional logic
				$field['conditional_logic'] = 0;

				// update field
				acf_update_field( $field );

				// Output HTML.
				$link = '<a href="' . admin_url( 'post.php?post=' . $field_group['ID'] . '&action=edit' ) . '" target="_blank">' . esc_html( $field_group['title'] ) . '</a>';

				echo '' .
					'<p><strong>' . __( 'Move Complete.', 'acf' ) . '</strong></p>' .
					'<p>' . sprintf(
						acf_punctify( __( 'The %1$s field can now be found in the %2$s field group', 'acf' ) ),
						esc_html( $field['label'] ),
						$link
					) . '</p>' .
					'<a href="#" class="button button-primary acf-close-popup">' . __( 'Close Window', 'acf' ) . '</a>';
				die();
			}

			// get all field groups
			$field_groups = acf_get_field_groups();
			$choices      = array();

			// check
			if ( ! empty( $field_groups ) ) {

				// loop
				foreach ( $field_groups as $field_group ) {

					// bail early if no ID
					if ( ! $field_group['ID'] ) {
						continue;
					}

					// bail ealry if is current
					if ( $field_group['ID'] == $args['post_id'] ) {
						continue;
					}

					// append
					$choices[ $field_group['ID'] ] = $field_group['title'];

				}
			}

			// render options
			$field = acf_get_valid_field(
				array(
					'type'    => 'select',
					'name'    => 'acf_field_group',
					'choices' => $choices,
				)
			);

			echo '<p>' . __( 'Please select the destination for this field', 'acf' ) . '</p>';

			echo '<form id="acf-move-field-form">';

				// render
				acf_render_field_wrap( $field );

				echo '<button type="submit" class="button button-primary">' . __( 'Move Field', 'acf' ) . '</button>';

			echo '</form>';

			// die
			die();

		}

	}

	// initialize
	new acf_admin_field_group();

endif;

?>

Youez - 2016 - github.com/yon3zu
LinuXploit