WordPress.org

Make WordPress Core

Ticket #4362: get-term-param-omitted.diff

File get-term-param-omitted.diff, 526 bytes (added by nbachiyski, 7 years ago)
  • wp-includes/category.php

     
    4444                $path = '/' . $leaf_path; 
    4545                $curcategory = $category; 
    4646                while ( ($curcategory->parent != 0) && ($curcategory->parent != $curcategory->term_id) ) { 
    47                         $curcategory = get_term($curcategory->parent); 
     47                        $curcategory = get_term($curcategory->parent, 'category'); 
    4848                        $path = '/' . $curcategory->slug . $path; 
    4949                } 
    5050