Make WordPress Core

Changeset 42367


Ignore:
Timestamp:
12/04/2017 09:02:10 PM (6 years ago)
Author:
boonebgorges
Message:

get_the_category_by_ID() should be taxonomy-agnostic.

Prior to 4.9, this function was accidentally taxonomy-agnostic in most cases.
The fix in [40979] caused a regression in this function. For backward
compatibility, we make it explicit that the query is by ID only.

See #42771.

Location:
trunk
Files:
1 added
1 edited

Legend:

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

    r42366 r42367  
    108108function get_the_category_by_ID( $cat_ID ) {
    109109    $cat_ID   = (int) $cat_ID;
    110     $category = get_term( $cat_ID, 'category' );
     110    $category = get_term( $cat_ID );
    111111
    112112    if ( is_wp_error( $category ) ) {
Note: See TracChangeset for help on using the changeset viewer.