WordPress.org

Make WordPress Core

Ticket #16718: 16718.patch

File 16718.patch, 736 bytes (added by SergeyBiryukov, 3 years ago)
  • wp-includes/category-template.php

     
    226226 * As of 2.7, the function can be used anywhere if it is provided a post ID or post object. 
    227227 * 
    228228 * @since 1.2.0 
     229 * @uses has_category() 
    229230 * 
    230231 * @param int|string|array $category Category ID, name or slug, or array of said. 
    231232 * @param int|object $_post Optional. Post to check instead of the current post. (since 2.7.0) 
     
    235236        if ( empty( $category ) ) 
    236237                return false; 
    237238 
    238         return has_term( $category, 'category', $post ); 
     239        return has_category( $category, $post ); 
    239240} 
    240241 
    241242/**