action = ''; // actions add_action('admin_menu', array($this,'admin_menu'), 11, 0); // filters add_filter('acf/export/clean_fields', array($this,'clean_fields'), 10, 1); } /* * admin_menu * * @description: * @created: 2/08/12 */ function admin_menu() { // add page $page = add_submenu_page('edit.php?post_type=acf', __('Export','acf'), __('Export','acf'), 'manage_options', 'acf-export', array($this,'html')); // actions add_action('load-' . $page, array($this,'load')); add_action('admin_print_scripts-' . $page, array($this, 'admin_print_scripts')); add_action('admin_print_styles-' . $page, array($this, 'admin_print_styles')); add_action('admin_head-' . $page, array($this,'admin_head')); } /* * load * * @description: * @since 3.5.2 * @created: 16/11/12 * @thanks: Kevin Biloski and Charlie Eriksen via Secunia SVCRP */ function load() { // vars $path = apply_filters('acf/get_info', 'path'); // verify nonce if( isset($_POST['nonce']) && wp_verify_nonce($_POST['nonce'], 'export') ) { if( isset($_POST['export_to_xml']) ) { $this->action = 'export_to_xml'; } elseif( isset($_POST['export_to_php']) ) { $this->action = 'export_to_php'; } } // include export action if( $this->action == 'export_to_xml' ) { include_once($path . 'core/actions/export.php'); die; } } /* * admin_print_scripts * * @description: * @since 3.1.8 * @created: 23/06/12 */ function admin_print_scripts() { } /* * admin_print_styles * * @description: * @since 3.1.8 * @created: 23/06/12 */ function admin_print_styles() { wp_enqueue_style(array( 'wp-pointer', 'acf-global', 'acf', )); } /* * admin_head * * @description: * @since 3.1.8 * @created: 23/06/12 */ function admin_head() { } /* * html * * @description: * @since 3.1.8 * @created: 23/06/12 */ function html() { ?>

action == "export_to_php" ) { $this->html_php(); } else { $this->html_index(); } ?>
-1, 'post_type' => 'acf', 'orderby' => 'menu_order title', 'order' => 'asc', )); // blank array to hold acfs $choices = array(); if($acfs) { foreach($acfs as $acf) { // find title. Could use get_the_title, but that uses get_post(), so I think this uses less Memory $title = apply_filters( 'the_title', $acf->post_title, $acf->ID ); $choices[$acf->ID] = $title; } } ?>

'select', 'name' => 'acf_posts', 'value' => '', 'choices' => $choices, 'multiple' => 1, )); ?>
  • " />
  • " />


will appear in the list of editable field groups. This is useful for migrating fields groups between Wp websites.",'acf'); ?>


will not appear in the list of editable field groups. This is useful for including fields in themes.",'acf'); ?>


will not appear in the list of editable field groups. This is useful for including fields in themes.",'acf'); ?>


include_once('advanced-custom-fields/acf.php');

before the include_once code:",'acf'); ?>

define( 'ACF_LITE', true );


«

$field ) { // unset unneccessary bits unset( $field['id'], $field['class'], $field['order_no'], $field['field_group'], $field['_name'] ); // instructions if( !$field['instructions'] ) { unset( $field['instructions'] ); } // Required if( !$field['required'] ) { unset( $field['required'] ); } // conditional logic if( !$field['conditional_logic']['status'] ) { unset( $field['conditional_logic'] ); } // children if( isset($field['sub_fields']) ) { $field['sub_fields'] = apply_filters('acf/export/clean_fields', $field['sub_fields']); } elseif( isset($field['layouts']) ) { foreach( $field['layouts'] as $l => $layout ) { $field['layouts'][ $l ]['sub_fields'] = apply_filters('acf/export/clean_fields', $layout['sub_fields']); } } // override field $fields[ $i ] = $field; } } return $fields; } } new acf_export(); ?>