/core/controllers/everything_fields.php

  1. <?php  
  2.  
  3. class acf_everything_fields  
  4.  
  5. var $settings,  
  6. $data; 
  7.  
  8.  
  9. /** 
  10. * __construct 
  11. * 
  12. * @description:  
  13. * @since 3.1.8 
  14. * @created: 23/06/12 
  15. */ 
  16.  
  17. function __construct() 
  18. // data for passing variables 
  19. $this->data = array( 
  20. 'page_id' => '', // a string used to load values 
  21. 'metabox_ids' => array(),  
  22. 'page_type' => '', // taxonomy / user / media 
  23. 'page_action' => '', // add / edit 
  24. 'option_name' => '', // key used to find value in wp_options table. eg: user_1, category_4 
  25. ); 
  26.  
  27.  
  28. // actions 
  29. add_action('admin_menu', array($this, 'admin_menu')); 
  30. add_action('wp_ajax_acf/everything_fields', array($this, 'acf_everything_fields')); 
  31.  
  32.  
  33. // attachment 
  34. add_filter('attachment_fields_to_edit', array($this, 'attachment_fields_to_edit'), 10, 2); 
  35. add_filter('attachment_fields_to_save', array($this, 'save_attachment'), 10, 2); 
  36.  
  37.  
  38. // save 
  39. add_action('create_term', array($this, 'save_taxonomy')); 
  40. add_action('edited_term', array($this, 'save_taxonomy')); 
  41. add_action('edit_user_profile_update', array($this, 'save_user')); 
  42. add_action('personal_options_update', array($this, 'save_user')); 
  43. add_action('user_register', array($this, 'save_user')); 
  44.  
  45.  
  46. // shopp 
  47. add_action('shopp_category_saved', array($this, 'shopp_category_saved')); 
  48.  
  49.  
  50. // delete 
  51. add_action('delete_term', array($this, 'delete_term'), 10, 4); 
  52.  
  53.  
  54. /** 
  55. * attachment_fields_to_edit 
  56. * 
  57. * Adds ACF fields to the attachment form fields 
  58. * 
  59. * @type filter 
  60. * @date 14/07/13 
  61. * 
  62. * @param {array} $form_fields 
  63. * @return {object} $post 
  64. */ 
  65.  
  66. function attachment_fields_to_edit( $form_fields, $post )  
  67. // vars 
  68. $screen = get_current_screen(); 
  69. $post_id = $post->ID; 
  70.  
  71.  
  72. if( $screen && $screen->base == 'post' ) { 
  73.  
  74. return $form_fields; 
  75.  
  76.  
  77.  
  78. // get field groups 
  79. $filter = array( 'post_type' => 'attachment' ); 
  80. $metabox_ids = array(); 
  81. $metabox_ids = apply_filters( 'acf/location/match_field_groups', $metabox_ids, $filter ); 
  82.  
  83.  
  84. // validate 
  85. if( empty($metabox_ids) ) 
  86. return $form_fields;  
  87.  
  88.  
  89. $acfs = apply_filters('acf/get_field_groups', array()); 
  90.  
  91.  
  92. if( is_array($acfs) ) { foreach( $acfs as $acf ) { 
  93.  
  94. // only add the chosen field groups 
  95. if( !in_array( $acf['id'], $metabox_ids ) ) 
  96. continue; 
  97.  
  98.  
  99. // load fields 
  100. $fields = apply_filters('acf/field_group/get_fields', array(), $acf['id']); 
  101.  
  102.  
  103. if( is_array($fields) ) { foreach( $fields as $i => $field ) { 
  104.  
  105. // if they didn't select a type, skip this field 
  106. if( !$field || !$field['type'] || $field['type'] == 'null' ) 
  107. continue; 
  108.  
  109.  
  110. // set value 
  111. if( !isset($field['value']) ) 
  112. $field['value'] = apply_filters('acf/load_value', false, $post_id, $field); 
  113. $field['value'] = apply_filters('acf/format_value', $field['value'], $post_id, $field); 
  114.  
  115.  
  116. // create field 
  117. $field['name'] = 'fields[' . $field['key'] . ']'; 
  118.  
  119. ob_start(); 
  120.  
  121. do_action('acf/create_field', $field); 
  122.  
  123. $html = ob_get_contents(); 
  124.  
  125. ob_end_clean(); 
  126.  
  127.  
  128. $form_fields[ $field['name'] ] = array( 
  129. 'label' => $field['label'],  
  130. 'input' => 'html',  
  131. 'html' => $html 
  132. ); 
  133.  
  134. }}; 
  135.  
  136.  
  137. }} 
  138.  
  139.  
  140. // return 
  141. return $form_fields; 
  142.  
  143.  
  144. /** 
  145. * save_attachment 
  146. * 
  147. * Triggers the acf/save_post action 
  148. * 
  149. * @type action 
  150. * @date 14/07/13 
  151. * 
  152. * @param {array} $post 
  153. * @return {array} $attachment 
  154. */ 
  155.  
  156. function save_attachment( $post, $attachment ) 
  157. // verify nonce 
  158. /** 
  159. if( !isset($_POST['acf_nonce']) || !wp_verify_nonce($_POST['acf_nonce'], 'input') ) 
  160. { 
  161. return $post; 
  162. } 
  163. */ 
  164.  
  165.  
  166. // $post_id to save against 
  167. $post_id = $post['ID']; 
  168.  
  169.  
  170. // update the post 
  171. do_action('acf/save_post', $post_id); 
  172.  
  173.  
  174. return $post; 
  175.  
  176.  
  177. /** 
  178. * validate_page 
  179. * 
  180. * @description: returns true | false. Used to stop a function from continuing 
  181. * @since 3.2.6 
  182. * @created: 23/06/12 
  183. */ 
  184.  
  185. function validate_page() 
  186. // global 
  187. global $pagenow, $wp_version; 
  188.  
  189.  
  190. // vars 
  191. $return = false; 
  192.  
  193.  
  194. // validate page 
  195. if( in_array( $pagenow, array( 'edit-tags.php', 'term.php', 'profile.php', 'user-new.php', 'user-edit.php', 'media.php' ) ) ) 
  196. $return = true; 
  197.  
  198.  
  199. // validate page (Shopp) 
  200. if( $pagenow == "admin.php" && isset( $_GET['page'], $_GET['id'] ) && $_GET['page'] == "shopp-categories" ) 
  201. $return = true; 
  202.  
  203.  
  204. // WP4 
  205. if( $pagenow === 'upload.php' && version_compare($wp_version, '4.0', '>=') ) { 
  206.  
  207. $return = true; 
  208.  
  209.  
  210.  
  211. // return 
  212. return $return; 
  213.  
  214.  
  215. /**-------------------------------------------------------------------------------------- 
  216. * 
  217. * admin_menu 
  218. * 
  219. * @author Elliot Condon 
  220. * @since 3.1.8 
  221. *  
  222. *-------------------------------------------------------------------------------------*/ 
  223.  
  224. function admin_menu()  
  225.  
  226. global $pagenow; 
  227.  
  228.  
  229. // validate page 
  230. if( ! $this->validate_page() ) return; 
  231.  
  232.  
  233. // set page type 
  234. $filter = array(); 
  235.  
  236. if( $pagenow == "admin.php" && isset( $_GET['page'], $_GET['id'] ) && $_GET['page'] == "shopp-categories" ) 
  237. // filter 
  238. $_GET['id'] = filter_var($_GET['id'], FILTER_SANITIZE_STRING); 
  239.  
  240.  
  241. $this->data['page_type'] = "shopp_category"; 
  242. $filter['ef_taxonomy'] = "shopp_category"; 
  243.  
  244. $this->data['page_action'] = "add"; 
  245. $this->data['option_name'] = ""; 
  246.  
  247. if( $_GET['id'] != "new" ) 
  248. $this->data['page_action'] = "edit"; 
  249. $this->data['option_name'] = "shopp_category_" . $_GET['id']; 
  250.  
  251. } elseif( $pagenow == "edit-tags.php" || $pagenow == "term.php" ) { 
  252.  
  253. // vars 
  254. $taxonomy = 'post_tag'; 
  255. $term_id = 0; 
  256.  
  257.  
  258. // $_GET 
  259. if( !empty($_GET['taxonomy']) ) { 
  260.  
  261. $taxonomy = filter_var($_GET['taxonomy'], FILTER_SANITIZE_STRING); 
  262.  
  263.  
  264. if( !empty($_GET['tag_ID']) ) { 
  265.  
  266. $term_id = filter_var($_GET['tag_ID'], FILTER_SANITIZE_NUMBER_INT); 
  267.  
  268.  
  269.  
  270. // update filter 
  271. $filter['ef_taxonomy'] = $taxonomy; 
  272.  
  273.  
  274. // add 
  275. $this->data['page_type'] = "taxonomy"; 
  276. $this->data['page_action'] = "add"; 
  277. $this->data['option_name'] = ""; 
  278.  
  279.  
  280. // edit 
  281. if( $term_id ) { 
  282.  
  283. $this->data['page_action'] = "edit"; 
  284. $this->data['option_name'] = $taxonomy . "_" . $term_id; 
  285.  
  286.  
  287. elseif( $pagenow == "profile.php" ) 
  288.  
  289. $this->data['page_type'] = "user"; 
  290. $filter['ef_user'] = get_current_user_id(); 
  291.  
  292. $this->data['page_action'] = "edit"; 
  293. $this->data['option_name'] = "user_" . get_current_user_id(); 
  294.  
  295. elseif( $pagenow == "user-edit.php" && isset($_GET['user_id']) ) 
  296. // filter 
  297. $_GET['user_id'] = filter_var($_GET['user_id'], FILTER_SANITIZE_NUMBER_INT); 
  298.  
  299.  
  300. $this->data['page_type'] = "user"; 
  301. $filter['ef_user'] = $_GET['user_id']; 
  302.  
  303. $this->data['page_action'] = "edit"; 
  304. $this->data['option_name'] = "user_" . $_GET['user_id']; 
  305.  
  306. elseif( $pagenow == "user-new.php" ) 
  307. $this->data['page_type'] = "user"; 
  308. $filter['ef_user'] ='all'; 
  309.  
  310. $this->data['page_action'] = "add"; 
  311. $this->data['option_name'] = ""; 
  312.  
  313. elseif( $pagenow == "media.php" || $pagenow == 'upload.php' ) 
  314.  
  315. $this->data['page_type'] = "media"; 
  316. $filter['post_type'] = 'attachment'; 
  317.  
  318. $this->data['page_action'] = "add"; 
  319. $this->data['option_name'] = ""; 
  320.  
  321. if(isset($_GET['attachment_id'])) 
  322. // filter 
  323. $_GET['attachment_id'] = filter_var($_GET['attachment_id'], FILTER_SANITIZE_NUMBER_INT); 
  324.  
  325.  
  326. $this->data['page_action'] = "edit"; 
  327. $this->data['option_name'] = $_GET['attachment_id']; 
  328.  
  329.  
  330.  
  331. // get field groups 
  332. $metabox_ids = array(); 
  333. $this->data['metabox_ids'] = apply_filters( 'acf/location/match_field_groups', $metabox_ids, $filter ); 
  334.  
  335.  
  336. // dont continue if no ids were found 
  337. if( empty( $this->data['metabox_ids'] ) ) 
  338. return false;  
  339.  
  340.  
  341. // actions 
  342. add_action('admin_enqueue_scripts', array($this, 'admin_enqueue_scripts')); 
  343. add_action('admin_head', array($this, 'admin_head')); 
  344.  
  345.  
  346.  
  347.  
  348. /** 
  349. * admin_enqueue_scripts 
  350. * 
  351. * @description:  
  352. * @since: 3.6 
  353. * @created: 30/01/13 
  354. */ 
  355.  
  356. function admin_enqueue_scripts() 
  357. do_action('acf/input/admin_enqueue_scripts'); 
  358.  
  359.  
  360. /**-------------------------------------------------------------------------------------- 
  361. * 
  362. * admin_head 
  363. * 
  364. * @author Elliot Condon 
  365. * @since 3.1.8 
  366. *  
  367. *-------------------------------------------------------------------------------------*/ 
  368.  
  369. function admin_head() 
  370. {  
  371. global $pagenow; 
  372.  
  373.  
  374. // add user js + css 
  375. do_action('acf/input/admin_head'); 
  376.  
  377.  
  378. ?> 
  379. <script type="text/javascript"> 
  380. (function($) { 
  381.  
  382. acf.data = { 
  383. action : 'acf/everything_fields',  
  384. metabox_ids : '<?php echo implode( ', ', $this->data['metabox_ids'] ); ?>',  
  385. page_type : '<?php echo $this->data['page_type']; ?>',  
  386. page_action : '<?php echo $this->data['page_action']; ?>',  
  387. option_name : '<?php echo $this->data['option_name']; ?>' 
  388. }; 
  389.  
  390. $(document).ready(function() { 
  391.  
  392. $.ajax({ 
  393. url: ajaxurl,  
  394. data: acf.data,  
  395. type: 'post',  
  396. dataType: 'html',  
  397. success: function(html) { 
  398.  
  399. <?php  
  400. if($this->data['page_type'] == "user") 
  401. if($this->data['page_action'] == "add") 
  402. echo "$('#createuser > table.form-table:last > tbody').append( html );"; 
  403. else 
  404. echo "$('#your-profile .form-table:last').after( html );"; 
  405. elseif($this->data['page_type'] == "shopp_category") 
  406. echo "$('#post-body-content').append( html );"; 
  407. elseif($this->data['page_type'] == "taxonomy") 
  408. if($this->data['page_action'] == "add") 
  409. echo "$('#addtag > p.submit').before( html );"; 
  410. else 
  411. echo "$('#edittag > table.form-table:first > tbody').append( html );"; 
  412. elseif($this->data['page_type'] == "media") 
  413. if($this->data['page_action'] == "add") 
  414. echo "$('#addtag > p.submit').before( html );"; 
  415. else 
  416. echo "$('#media-single-form table tbody tr.submit').before( html );"; 
  417. ?> 
  418.  
  419. setTimeout( function() {  
  420. $(document).trigger('acf/setup_fields', $('#wpbody') );  
  421. }, 200); 
  422.  
  423. }); 
  424.  
  425.  
  426. /* 
  427. * Taxonomy Add 
  428. * 
  429. * @description:  
  430. * @since: 3.6 
  431. * @created: 24/02/13 
  432. */ 
  433.  
  434. $(document).ajaxComplete(function(event, xhr, settings) { 
  435.  
  436. // vars 
  437. data = acf.helpers.url_to_object(settings.data); 
  438.  
  439.  
  440. // validate 
  441. if( data.action != 'add-tag' ) 
  442. return; 
  443.  
  444.  
  445. // vars 
  446. var $el = $('#addtag'); 
  447.  
  448.  
  449. // clear WYSIWYG field 
  450. $el.find('.acf_wysiwyg textarea').each(function() { 
  451.  
  452.  
  453. // vars 
  454. var textarea = $(this),  
  455. id = textarea.attr('id'),  
  456. editor = tinyMCE.get( id ); 
  457.  
  458. if( editor ) 
  459. editor.setContent(''); 
  460. editor.save(); 
  461.  
  462. }); 
  463.  
  464.  
  465. // clear image / file fields 
  466. $el.find('.field .active').removeClass('active'); 
  467.  
  468.  
  469. // clear checkbox 
  470. $el.find('input[type="checkbox"]').removeAttr('checked'); 
  471.  
  472. }); 
  473.  
  474. }); 
  475.  
  476.  
  477. })(jQuery); 
  478. </script> 
  479. <?php 
  480.  
  481.  
  482.  
  483. /**-------------------------------------------------------------------------------------- 
  484. * 
  485. * save_taxonomy 
  486. * 
  487. * @author Elliot Condon 
  488. * @since 3.1.8 
  489. *  
  490. *-------------------------------------------------------------------------------------*/ 
  491.  
  492. function save_taxonomy( $term_id ) 
  493. // verify nonce 
  494. if( !isset($_POST['acf_nonce']) || !wp_verify_nonce($_POST['acf_nonce'], 'input') ) 
  495. return $term_id; 
  496.  
  497.  
  498. // for some weird reason, this is triggered by saving a menu...  
  499. if( !isset($_POST['taxonomy']) ) 
  500. return; 
  501.  
  502. // $post_id to save against 
  503. $post_id = $_POST['taxonomy'] . '_' . $term_id; 
  504.  
  505.  
  506. // update the post 
  507. do_action('acf/save_post', $post_id); 
  508.  
  509.  
  510.  
  511. /**-------------------------------------------------------------------------------------- 
  512. * 
  513. * profile_save 
  514. * 
  515. * @author Elliot Condon 
  516. * @since 3.1.8 
  517. *  
  518. *-------------------------------------------------------------------------------------*/ 
  519.  
  520. function save_user( $user_id ) 
  521. // verify nonce 
  522. if( !isset($_POST['acf_nonce']) || !wp_verify_nonce($_POST['acf_nonce'], 'input') ) 
  523. return $user_id; 
  524.  
  525.  
  526. // $post_id to save against 
  527. $post_id = 'user_' . $user_id; 
  528.  
  529.  
  530. // update the post 
  531. do_action('acf/save_post', $post_id); 
  532.  
  533.  
  534.  
  535. /** 
  536. * shopp_category_saved 
  537. * 
  538. * @description:  
  539. * @since 3.5.2 
  540. * @created: 27/11/12 
  541. */ 
  542.  
  543. function shopp_category_saved( $category ) 
  544. // verify nonce 
  545. if( !isset($_POST['acf_nonce']) || !wp_verify_nonce($_POST['acf_nonce'], 'input') ) 
  546. return $category; 
  547.  
  548.  
  549. // $post_id to save against 
  550. $post_id = 'shopp_category_' . $category->id; 
  551.  
  552.  
  553. // update the post 
  554. do_action('acf/save_post', $post_id); 
  555.  
  556.  
  557.  
  558.  
  559. /**-------------------------------------------------------------------------------------- 
  560. * 
  561. * acf_everything_fields 
  562. * 
  563. * @description Ajax call that renders the html needed for the page 
  564. * @author Elliot Condon 
  565. * @since 3.1.8 
  566. *  
  567. *-------------------------------------------------------------------------------------*/ 
  568.  
  569. function acf_everything_fields() 
  570. // defaults 
  571. $defaults = array( 
  572. 'metabox_ids' => '',  
  573. 'page_type' => '',  
  574. 'page_action' => '',  
  575. 'option_name' => '',  
  576. ); 
  577.  
  578.  
  579. // load post options 
  580. $options = array_merge($defaults, $_POST); 
  581.  
  582.  
  583. // metabox ids is a string with commas 
  584. $options['metabox_ids'] = explode( ', ', $options['metabox_ids'] ); 
  585.  
  586.  
  587. // get acfs 
  588. $acfs = apply_filters('acf/get_field_groups', false); 
  589.  
  590.  
  591. // layout 
  592. $layout = 'tr';  
  593. if( $options['page_type'] == "taxonomy" && $options['page_action'] == "add") 
  594. $layout = 'div'; 
  595. if( $options['page_type'] == "shopp_category") 
  596. $layout = 'metabox'; 
  597.  
  598.  
  599. if( $acfs ) 
  600. foreach( $acfs as $acf ) 
  601. // load options 
  602. $acf['options'] = apply_filters('acf/field_group/get_options', array(), $acf['id']); 
  603.  
  604.  
  605. // only add the chosen field groups 
  606. if( !in_array( $acf['id'], $options['metabox_ids'] ) ) 
  607. continue; 
  608.  
  609.  
  610. // layout dictates heading 
  611. $title = true; 
  612.  
  613. if( $acf['options']['layout'] == 'no_box' ) 
  614. $title = false; 
  615.  
  616.  
  617. // title  
  618. if( $options['page_action'] == "edit" && $options['page_type'] == 'user' ) 
  619. if( $title ) 
  620. echo '<h3>' .$acf['title'] . '</h3>'; 
  621.  
  622. echo '<table class="form-table"><tbody>'; 
  623.  
  624.  
  625. // wrapper 
  626. if( $layout == 'tr' ) 
  627. //nonce 
  628. echo '<tr style="display:none;"><td colspan="2"><input type="hidden" name="acf_nonce" value="' . wp_create_nonce( 'input' ) . '" /></td></tr>'; 
  629. else 
  630. //nonce 
  631. echo '<input type="hidden" name="acf_nonce" value="' . wp_create_nonce( 'input' ) . '" />'; 
  632.  
  633. if( $layout == 'metabox' ) 
  634. echo '<div class="postbox acf_postbox" id="acf_'. $acf['id'] .'">'; 
  635. echo '<div title="Click to toggle" class="handlediv"><br></div><h3 class="hndle"><span>' . $acf['title'] . '</span></h3>'; 
  636. echo '<div class="inside">'; 
  637.  
  638.  
  639. // load fields 
  640. $fields = apply_filters('acf/field_group/get_fields', array(), $acf['id']); 
  641.  
  642.  
  643. if( is_array($fields) ) { foreach( $fields as $field ) { 
  644.  
  645. // if they didn't select a type, skip this field 
  646. if( !$field['type'] || $field['type'] == 'null' ) continue; 
  647.  
  648.  
  649. // set value 
  650. if( !isset($field['value']) ) 
  651. $field['value'] = apply_filters('acf/load_value', false, $options['option_name'], $field); 
  652. $field['value'] = apply_filters('acf/format_value', $field['value'], $options['option_name'], $field); 
  653.  
  654.  
  655. // required 
  656. $required_class = ""; 
  657. $required_label = ""; 
  658.  
  659. if( $field['required'] ) 
  660. $required_class = ' required'; 
  661. $required_label = ' <span class="required">*</span>'; 
  662.  
  663.  
  664. if( $layout == 'metabox' ) 
  665. echo '<div id="acf-' . $field['name'] . '" class="field field_type-' . $field['type'] . ' field_key-' . $field['key'] . $required_class . '" data-field_name="' . $field['name'] . '" data-field_key="' . $field['key'] . '" data-field_type="' . $field['type'] . '">'; 
  666.  
  667. echo '<p class="label">'; 
  668. echo '<label for="fields[' . $field['key'] . ']">' . $field['label'] . $required_label . '</label>'; 
  669. echo $field['instructions']; 
  670. echo '</p>'; 
  671.  
  672. $field['name'] = 'fields[' . $field['key'] . ']'; 
  673. do_action('acf/create_field', $field); 
  674.  
  675. echo '</div>'; 
  676. elseif( $layout == 'div' ) 
  677. echo '<div id="acf-' . $field['name'] . '" class="form-field field field_type-' . $field['type'] . ' field_key-' . $field['key'] . $required_class . '" data-field_name="' . $field['name'] . '" data-field_key="' . $field['key'] . '" data-field_type="' . $field['type'] . '">'; 
  678.  
  679. echo '<label for="fields[' . $field['key'] . ']">' . $field['label'] . $required_label . '</label>';  
  680. $field['name'] = 'fields[' . $field['key'] . ']'; 
  681. do_action('acf/create_field', $field ); 
  682. if($field['instructions']) echo '<p class="description">' . $field['instructions'] . '</p>'; 
  683.  
  684. echo '</div>'; 
  685. else 
  686. echo '<tr id="acf-' . $field['name'] . '" class="form-field field field_type-' . $field['type'] . ' field_key-'.$field['key'] . $required_class . '" data-field_name="' . $field['name'] . '" data-field_key="' . $field['key'] . '" data-field_type="' . $field['type'] . '">'; 
  687. echo '<th valign="top" scope="row"><label for="fields[' . $field['key'] . ']">' . $field['label'] . $required_label . '</label></th>';  
  688. echo '<td>'; 
  689. $field['name'] = 'fields[' . $field['key'] . ']'; 
  690. do_action('acf/create_field', $field ); 
  691.  
  692. if($field['instructions']) echo '<p class="description">' . $field['instructions'] . '</p>'; 
  693. echo '</td>'; 
  694. echo '</tr>'; 
  695.  
  696.  
  697. }} 
  698.  
  699.  
  700.  
  701. // wrapper 
  702. if( $layout == 'metabox' ) 
  703. echo '</div></div>'; 
  704.  
  705.  
  706. // title  
  707. if( $options['page_action'] == "edit" && $options['page_type'] == 'user' ) 
  708. echo '</tbody></table>'; 
  709.  
  710.  
  711. // foreach($acfs as $acf) 
  712. // if($acfs) 
  713.  
  714. // exit for ajax 
  715. die(); 
  716.  
  717.  
  718.  
  719. /** 
  720. * delete_term 
  721. * 
  722. * @description:  
  723. * @since: 3.5.7 
  724. * @created: 12/01/13 
  725. */ 
  726.  
  727. function delete_term( $term, $tt_id, $taxonomy, $deleted_term ) 
  728. global $wpdb; 
  729.  
  730. $values = $wpdb->query($wpdb->prepare( 
  731. "DELETE FROM $wpdb->options WHERE option_name LIKE %s",  
  732. '%' . $taxonomy . '_' . $term . '%' 
  733. )); 
  734.  
  735.  
  736.  
  737. new acf_everything_fields(); 
  738.  
  739. ?> 
.