WordPress.org

Make WordPress Core

Changeset 37615


Ignore:
Timestamp:
06/01/2016 10:45:19 PM (3 years ago)
Author:
DrewAPicture
Message:

Docs: Improve return descriptions for get_the_category() and get_the_term() to specifically notate that an array of WP_Term objects is returned on success.

See #32246.

File:
1 edited

Legend:

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

    r37587 r37615  
    7575 *
    7676 * @param int $id Optional, default to current post ID. The post ID.
    77  * @return array Array of objects, one for each category assigned to the post.
     77 * @return array Array of WP_Term objects, one for each category assigned to the post.
    7878 */
    7979function get_the_category( $id = false ) {
     
    11861186 * @param int|object $post Post ID or object.
    11871187 * @param string $taxonomy Taxonomy name.
    1188  * @return array|false|WP_Error Array of term objects on success, false if there are no terms
     1188 * @return array|false|WP_Error Array of WP_Term objects on success, false if there are no terms
    11891189 *                              or the post does not exist, WP_Error on failure.
    11901190 */
Note: See TracChangeset for help on using the changeset viewer.