Docs: Clarify that `has_excerpt()` checks if the post has a custom excerpt, not some generated excerpt.
See #35487. Built from https://develop.svn.wordpress.org/trunk@40042 git-svn-id: http://core.svn.wordpress.org/trunk@39979 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
85b4cddebf
commit
cff9bc5a43
|
@ -398,15 +398,15 @@ function get_the_excerpt( $post = null ) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Whether post has excerpt.
|
* Whether the post has a custom excerpt.
|
||||||
*
|
*
|
||||||
* @since 2.3.0
|
* @since 2.3.0
|
||||||
*
|
*
|
||||||
* @param int|WP_Post $id Optional. Post ID or post object.
|
* @param int|WP_Post $post Optional. Post ID or WP_Post object. Default is global $post.
|
||||||
* @return bool
|
* @return bool True if the post has a custom excerpt, false otherwise.
|
||||||
*/
|
*/
|
||||||
function has_excerpt( $id = 0 ) {
|
function has_excerpt( $post = 0 ) {
|
||||||
$post = get_post( $id );
|
$post = get_post( $post );
|
||||||
return ( !empty( $post->post_excerpt ) );
|
return ( !empty( $post->post_excerpt ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '4.8-alpha-40041';
|
$wp_version = '4.8-alpha-40042';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
Loading…
Reference in New Issue