Make WordPress Core


Ignore:
Timestamp:
12/12/2010 08:32:29 PM (16 years ago)
Author:
scribu
Message:

Re-index categories in get_the_category(). Props greuben. Fixes #15442

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/category-template.php

    r16487 r16888  
    6868        if ( ! $categories )
    6969                $categories = array();
     70       
     71        $categories = array_values( $categories );
    7072
    7173        foreach ( array_keys( $categories ) as $key ) {
    7274                _make_cat_compat( $categories[$key] );
    7375        }
    74         // Filter name is plural because we are return alot of categories not just one
     76
     77        // Filter name is plural because we return alot of categories not just one
    7578        return apply_filters( 'get_the_categories', $categories );
    7679}
Note: See TracChangeset for help on using the changeset viewer.