Make WordPress Core

Changeset 25119


Ignore:
Timestamp:
08/24/2013 10:53:39 PM (11 years ago)
Author:
SergeyBiryukov
Message:

Make in_category() an alias of has_category(). fixes #16718.

File:
1 edited

Legend:

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

    r24490 r25119  
    226226 *
    227227 * @since 1.2.0
     228 * @uses has_category()
    228229 *
    229230 * @param int|string|array $category Category ID, name or slug, or array of said.
     
    232233 */
    233234function in_category( $category, $post = null ) {
    234     if ( empty( $category ) )
    235         return false;
    236 
    237     return has_term( $category, 'category', $post );
     235    return has_category( $category, $post );
    238236}
    239237
Note: See TracChangeset for help on using the changeset viewer.