Make WordPress Core

Ticket #12588: remove_default_for_id.diff

File remove_default_for_id.diff, 614 bytes (added by blepoxp, 13 years ago)

Removed lines for id and change default id from null to false so it would work with get_post_type

  • post.php

     
    683683}
    684684
    685685/**
     686 * Check if the current or specified post is a post type
     687 *
     688 * @since 3.0
     689 * @uses get_post_type()
     690 *
     691 * @param string|array $types Type or types to check.
     692 * @param int $id Post ID. Defaults to current ID.
     693 * @return bool
     694 */
     695function is_post_type( $types, $id = false ) {
     696        return in_array( get_post_type( $id ), (array) $types );
     697}
     698
     699/**
    686700 * Retrieve the post type of the current post or of a given post.
    687701 *
    688702 * @since 2.1.0