Uses
Uses | Description |
---|---|
wp-includes/post.php: get_post() | Retrieves post data given a post ID or post object. |
Determines whether the post has a custom excerpt.
For more information on this and similar theme functions, check out the Conditional Tags article in the Theme Developer Handbook.
(bool) True if the post has a custom excerpt, false otherwise.
File: wp-includes/post-template.php
function has_excerpt( $post = 0 ) { $post = get_post( $post ); return ( ! empty( $post->post_excerpt ) ); }
Version | Description |
---|---|
2.3.0 | Introduced. |
© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/has_excerpt