WordPress.org

Forums

Rich Tax Description Editor
[resolved] Problem with custom taxonomy (6 posts)

  1. beesolution.it
    Member
    Posted 3 years ago #

    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);
    		}
    	}
  2. Jason Paul
    Member
    Posted 3 years ago #

    Thanks for providing this fix!! Hopefully it gets committed to the plugin soon.

  3. easilyamused
    Member
    Posted 3 years ago #

    I had the same problem and @beesolution.it code fixed the bug.

    Thanks for the simple plugin ;c )

  4. jayarjo
    Member
    Plugin Author

    Posted 2 years ago #

    Sorry guys, for delayed response, was away, kinda :o)

    Ehm... although can't quickly grasp what is this fix for?.. Is there some problem with identically named custom taxonomies or something?

  5. The plugin works just fine as is on my custom taxonomies. Weird.

  6. Jason Paul
    Member
    Posted 2 years ago #

    Could be something in a newer version of WordPress fixed the problem?

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Rich Tax Description Editor
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic