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() { ?>
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 ); |