Changeset 24249 for trunk/wp-includes/post-formats.php
- Timestamp:
- 05/14/2013 01:57:59 PM (13 years ago)
- File:
-
- 1 edited
-
trunk/wp-includes/post-formats.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/post-formats.php
r24242 r24249 317 317 * 318 318 * @param string $content The post content. 319 * @param int $ id (optional) The post ID.319 * @param int $post_id (optional) The post ID. 320 320 * @return string Formatted output based on associated post format. 321 321 */ 322 function post_formats_compat( $content, $id = 0 ) { 323 $post = empty( $id ) ? get_post() : get_post( $id ); 324 if ( empty( $post ) ) 322 function post_formats_compat( $content, $post_id = 0 ) { 323 if ( ! $post = get_post( $post_id ) ) 325 324 return $content; 326 325 … … 640 639 * @since 3.6.0 641 640 * 642 * @param int $ id (optional) The post ID.641 * @param int $post_id (optional) The post ID. 643 642 * @return array The chat content. 644 643 */ 645 function get_the_post_format_chat( $id = 0 ) { 646 $post = empty( $id ) ? clone get_post() : get_post( $id ); 647 if ( empty( $post ) ) 644 function get_the_post_format_chat( $post_id = 0 ) { 645 if ( ! $post = get_post( $post_id ) ) 648 646 return array(); 649 647 … … 815 813 * @since 3.6.0 816 814 * 817 * @param int $ id (optional) The post ID.815 * @param int $post_id (optional) The post ID. 818 816 * @return string A URL, if found. 819 817 */ 820 function get_the_post_format_url( $id = 0 ) { 821 $post = empty( $id ) ? get_post() : get_post( $id ); 822 if ( empty( $post ) ) 818 function get_the_post_format_url( $post_id = 0 ) { 819 if ( ! $post = get_post( $post_id ) ) 823 820 return ''; 824 821
Note: See TracChangeset
for help on using the changeset viewer.