has_excerpt( int|WP_Post $post )

Whether the post has a custom excerpt.


Parameters

$post

(int|WP_Post) (Optional) Post ID or WP_Post object. Default is global $post.


Return

(bool) True if the post has a custom excerpt, false otherwise.


Source

File: wp-includes/post-template.php

function has_excerpt( $post = 0 ) {
	$post = get_post( $post );
	return ( !empty( $post->post_excerpt ) );
}


Changelog

Changelog
Version Description
WP-2.3.0 Introduced.