Ticket #12588: 12588.diff
File 12588.diff, 699 bytes (added by , 15 years ago) |
---|
-
post.php
661 661 } 662 662 663 663 /** 664 * Check if the current or specified post is a post type 665 * 666 * @since 3.0 667 * @uses $post 668 * @uses get_post_type() 669 * 670 * @param string|array $types Type or types to check. 671 * @param int $id Post ID. Defaults to current ID. 672 * @return bool 673 */ 674 function is_post_type( $types, $id = null ) { 675 global $post; 676 677 $id = ( null === $id ) ? $post->ID : $id; 678 679 return in_array( get_post_type( $id ), (array) $types ); 680 } 681 682 /** 664 683 * Retrieve the post type of the current post or of a given post. 665 684 * 666 685 * @since 2.1.0