taxonomy = $taxonomy; // actions do_action("acfe/load_term", $taxonomy, $term_id); do_action("acfe/load_term/taxonomy={$taxonomy}", $taxonomy, $term_id); // hooks add_action("{$taxonomy}_term_edit_form_top", array($this, 'add_term_meta_boxes'), 10, 2); add_action("{$taxonomy}_edit_form", array($this, 'do_term_meta_boxes'), 10, 2); } /** * add_term_meta_boxes * * {$taxonomy}_term_edit_form_top * * @param $term * @param $taxonomy */ function add_term_meta_boxes($term, $taxonomy){ do_action("acfe/add_term_meta_boxes", $taxonomy, $term); do_action("acfe/add_term_meta_boxes/taxonomy={$taxonomy}", $taxonomy, $term); // enhanced ui if(acf_get_setting('acfe/modules/ui')){ do_meta_boxes(get_current_screen(), 'acf_after_title', $term); } } /** * do_term_meta_boxes * * {$taxonomy}_edit_form * * @param $term * @param $taxonomy */ function do_term_meta_boxes($term, $taxonomy){ // enhanced ui if(acf_get_setting('acfe/modules/ui')){ // get screen $screen = get_current_screen(); // do metaboxes do_meta_boxes($screen, 'normal', $term); do_meta_boxes($screen, 'side', $term); } } /** * terms_load * * load-edit-tags.php */ function terms_load(){ // global global $pagenow, $taxnow; // validate (wordpress also load this hook on term.php) if($pagenow !== 'edit-tags.php'){ return; } // vars $taxonomy = $taxnow; // set vars $this->taxonomy = $taxonomy; // actions do_action("acfe/load_terms", $taxonomy); do_action("acfe/load_terms/taxonomy={$taxonomy}", $taxonomy); // hooks add_action('admin_footer', array($this, 'terms_footer')); } /** * terms_footer * * admin_footer */ function terms_footer(){ do_action('acfe/add_terms_meta_boxes', $this->taxonomy); $this->terms_do_meta_boxes(); } /** * terms_do_meta_boxes */ function terms_do_meta_boxes(){ // check filter if(!acf_is_filter_enabled('acfe/taxonomy_list')){ return; } ?>