[Plugin: Rich Tax Description Editor] Problem with custom taxonomy
-
Hi the plugin doesn’t active editor into custom-taxonomy terms
you can add these lines into main.php into main method a__init() line 24/25
global $wpdb; $SQL = "SELECT DISTINCT(taxonomy) as name FROM {$wpdb->term_taxonomy}"; $array = $wpdb->get_results($SQL); $taxonomy = get_taxonomies(); foreach($array as $k => $v){ if(!in_array($array[$k]->name,$taxonomy)){ $taxonomy[] = $array[$k]->name; } // End-if } // End-foreach
the new code is
function a__init() { global $wpdb; $SQL = "SELECT DISTINCT(taxonomy) as name FROM {$wpdb->term_taxonomy}"; $array = $wpdb->get_results($SQL); $taxonomy = get_taxonomies(); foreach($array as $k => $v){ if(!in_array($array[$k]->name,$taxonomy)){ $taxonomy[] = $array[$k]->name; } // End-if } // End-foreach foreach ($taxonomy as $tax) { add_action("{$tax}_pre_add_form", create_function('', 'ob_start();')); add_action("{$tax}_pre_edit_form", create_function('', 'ob_start();')); add_action("{$tax}_add_form", array($this, 'a_term_edit_form'), 10, 1); add_action("{$tax}_edit_form", array($this, 'a_term_edit_form'), 10, 2); } }
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘[Plugin: Rich Tax Description Editor] Problem with custom taxonomy’ is closed to new replies.