Ticket #23255: get-post-format.diff
| File get-post-format.diff, 707 bytes (added by adamsilverstein, 5 months ago) |
|---|
-
wp-includes/post.php
758 758 * 759 759 * @since 3.1.0 760 760 * 761 * @param int|object $post A post761 * @param int|object $post Post ID or post object. Optional, default is the current post from the loop. 762 762 * 763 763 * @return mixed The format if successful. False if no format is set. WP_Error if errors. 764 764 */ 765 765 function get_post_format( $post = null ) { 766 766 $post = get_post($post); 767 767 768 if ( empty($post) ) 769 return new WP_Error('invalid_post', __('Invalid post')); 770 768 771 if ( ! post_type_supports( $post->post_type, 'post-formats' ) ) 769 772 return false; 770 773