enqueue_scripts(); // var $this->taxonomy = $taxonomy; // hooks add_action('admin_enqueue_scripts', array($this, 'term_enqueue_scripts'), 15); add_action('admin_footer', array($this, 'term_footer')); } /* * Terms: Load */ function load_terms($taxonomy){ // enqueue $this->enqueue_scripts(); // hooks add_action('admin_footer', array($this, 'terms_footer')); } /* * Term: Add Metaboxes */ function add_term_meta_boxes($taxonomy, $term){ // post id $post_id = 'term_' . $term->term_id; // screen $screen = get_current_screen(); // field groups $field_groups = acf_get_field_groups(array( 'taxonomy' => $taxonomy )); if($field_groups){ // form data acf_form_data(array( 'screen' => 'taxonomy', 'post_id' => $post_id, )); $this->add_metaboxes($field_groups, $post_id, $screen); } // Sidebar submit add_meta_box('submitdiv', __('Edit'), array($this, 'render_metabox_submit'), $screen, 'side', 'high', 'term'); } /* * Term: Enqueue Scripts */ function term_enqueue_scripts(){ // remove acf render (must be priority 15 to remove it correctly) // advanced-custom-fields-pro/includes/forms/form-taxonomy.php acfe_remove_class_action("{$this->taxonomy}_edit_form", 'acf_form_taxonomy', 'edit_term'); } /* * Term: Footer */ function term_footer(){ global $tag, $tax; ?>
cap->edit_terms); ?>