Ticket #27246: 27246.diff
File 27246.diff, 1.2 KB (added by , 9 years ago) |
---|
-
wp-includes/post-template.php
338 338 * Display the post excerpt. 339 339 * 340 340 * @since 0.71 341 * 342 * @param mixed $post Optional post ID or WP_Post object indicating which post to excerpt. 341 343 */ 342 function the_excerpt( ) {344 function the_excerpt( $post = '' ) { 343 345 344 346 /** 345 347 * Filter the displayed post excerpt. … … 350 352 * 351 353 * @param string $post_excerpt The post excerpt. 352 354 */ 353 echo apply_filters( 'the_excerpt', get_the_excerpt( ) );355 echo apply_filters( 'the_excerpt', get_the_excerpt( $post ) ); 354 356 } 355 357 356 358 /** … … 358 360 * 359 361 * @since 0.71 360 362 * 361 * @param mixed $ deprecated Not used.363 * @param mixed $post Optional post ID or WP_Post object indicating which post to excerpt. 362 364 * @return string 363 365 */ 364 function get_the_excerpt( $ deprecated= '' ) {365 if ( ! empty( $deprecated ) )366 function get_the_excerpt( $post = '' ) { 367 if ( ! empty( $post ) && is_bool( $post ) ) { 366 368 _deprecated_argument( __FUNCTION__, '2.3' ); 369 } 367 370 368 $post = get_post( );371 $post = get_post( $post ); 369 372 if ( empty( $post ) ) { 370 373 return ''; 371 374 }