Changeset 14158
- Timestamp:
- 04/18/2010 05:40:50 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/post.php
r14155 r14158 667 667 668 668 return false; 669 } 670 671 /** 672 * Checks if a post type is registered, can also check if the current or specified post is of a post type. 673 * 674 * @since 3.0.0 675 * @uses get_post_type() 676 * 677 * @param string|array $types Type or types to check. Defaults to all post types. 678 * @param int $id Post ID. Defaults to current ID. 679 * @return bool 680 */ 681 function is_post_type( $types = false, $id = false ) { 682 $types = ( $types === false ) ? get_post_types() : (array) $types; 683 return in_array( get_post_type( $id ), $types ); 669 684 } 670 685
Note: See TracChangeset
for help on using the changeset viewer.