Ticket #12588: post.php.diff
File post.php.diff, 666 bytes (added by , 15 years ago) |
---|
-
post.php
old new 692 692 } 693 693 694 694 /** 695 * Check if the current or specified post is a post type 696 * 697 * @since 3.0 698 * @uses get_post_type() 699 * 700 * @param string|array $types Type or types to check. Defaults to all post types. 701 * @param int $id Post ID. Defaults to current ID. 702 * @return bool 703 */ 704 function is_post_type( $types = false, $id = false ) { 705 if ( $types === false ) 706 $types = get_post_types(); 707 return in_array( get_post_type( $id ), (array) $types ); 708 } 709 710 /** 695 711 * Retrieve the post type of the current post or of a given post. 696 712 * 697 713 * @since 2.1.0