Changeset 24057
- Timestamp:
- 04/22/2013 08:41:16 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/post-formats.php
r24045 r24057 12 12 * @since 3.1.0 13 13 * 14 * @param int|object $post A post. 15 * 16 * @return mixed The format if successful. False if no format is set. WP_Error if errors. 14 * @param int|object $post Post ID or post object. Optional, default is the current post from the loop. 15 * @return mixed The format if successful. False otherwise. 17 16 */ 18 17 function get_post_format( $post = null ) { 19 $post = get_post($post); 18 if ( ! $post = get_post( $post ) ) 19 return false; 20 20 21 21 if ( ! post_type_supports( $post->post_type, 'post-formats' ) ) … … 29 29 $format = array_shift( $_format ); 30 30 31 return ( str_replace('post-format-', '', $format->slug ));31 return str_replace('post-format-', '', $format->slug ); 32 32 } 33 33
Note: See TracChangeset
for help on using the changeset viewer.