IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
|
| 360 | 360 | * @since 4.5.0 Introduced the `$post` parameter. |
| 361 | 361 | * |
| 362 | 362 | * @param int|WP_Post $post Optional. Post ID or WP_Post object. Default is global $post. |
| | 363 | * @param bool $private Optional. Return post excerpt for private post. Default is true. |
| 363 | 364 | * @return string Post excerpt. |
| 364 | 365 | */ |
| 365 | | function get_the_excerpt( $post = null ) { |
| | 366 | function get_the_excerpt( $post = null, $private = true ) { |
| 366 | 367 | if ( is_bool( $post ) ) { |
| 367 | 368 | _deprecated_argument( __FUNCTION__, '2.3' ); |
| 368 | 369 | } |
| … |
… |
|
| 372 | 373 | return ''; |
| 373 | 374 | } |
| 374 | 375 | |
| 375 | | if ( post_password_required() ) { |
| | 376 | if ( $private && post_password_required() ) { |
| 376 | 377 | return __( 'There is no excerpt because this is a protected post.' ); |
| 377 | 378 | } |
| 378 | 379 | |
| … |
… |
|
| 397 | 398 | * @return bool |
| 398 | 399 | */ |
| 399 | 400 | function has_excerpt( $id = 0 ) { |
| 400 | | $post = get_post( $id ); |
| 401 | | return ( !empty( $post->post_excerpt ) ); |
| | 401 | return (bool) get_the_excerpt($id, false); |
| 402 | 402 | } |
| 403 | 403 | |
| 404 | 404 | /** |