Make WordPress Core

Changeset 33318


Ignore:
Timestamp:
07/17/2015 10:57:20 PM (10 years ago)
Author:
DrewAPicture
Message:

Update the description for get_the_category() with helpful information for the proper function to use for custom taxonomies.

Also adds a missing return description.

See #32246.

File:
1 edited

Legend:

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

    r32996 r33318  
    6666 * Retrieve post categories.
    6767 *
     68 * This tag may be used outside The Loop by passing a post id as the parameter.
     69 *
     70 * Note: This function only returns results from the default "category" taxonomy.
     71 * For custom taxonomies use get_the_terms().
     72 *
    6873 * @since 0.71
    6974 *
    7075 * @param int $id Optional, default to current post ID. The post ID.
    71  * @return array
     76 * @return array Array of objects, one for each category assigned to the post.
    7277 */
    7378function get_the_category( $id = false ) {
Note: See TracChangeset for help on using the changeset viewer.