Make WordPress Core


Ignore:
Timestamp:
06/11/2010 03:53:41 PM (13 years ago)
Author:
ryan
Message:

Deprecate is_term, is_taxonomy, is_post_type for *_exists(). Props nacin. fixes #13747

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/post.php

    r15190 r15220  
    674674 */
    675675function is_post_type_hierarchical( $post_type ) {
    676     if ( ! is_post_type( $post_type ) )
     676    if ( ! post_type_exists( $post_type ) )
    677677        return false;
    678678
     
    685685 *
    686686 * @since 3.0.0
    687  * @uses get_post_type()
     687 * @uses get_post_type_object()
    688688 *
    689689 * @param string Post type name
    690690 * @return bool Whether post type is registered.
    691691 */
    692 function is_post_type( $post_type ) {
     692function post_type_exists( $post_type ) {
    693693    return (bool) get_post_type_object( $post_type );
    694694}
Note: See TracChangeset for help on using the changeset viewer.