Ticket #7427: category.php.diff

File category.php.diff, 518 bytes (added by Malaiac, 4 years ago)

a less invasive way of allowing external taxonomy would be a filter

  • wp-includes/category.php

     
    4040        $defaults = array( 'type' => 'category' ); 
    4141        $args = wp_parse_args( $args, $defaults ); 
    4242 
    43         $taxonomy = 'category'; 
     43        $taxonomy = apply_filters('get_categories_taxonomy','category',$args); 
    4444        if ( 'link' == $args['type'] ) 
    4545                $taxonomy = 'link_category'; 
    4646        $categories = (array) get_terms( $taxonomy, $args );