wpseek.com
Outil de recherche WordPress pour les développeurs et auteurs de thèmes



has_excerpt › WordPress Function

Depuis2.3.0
Dépréciéen/a
has_excerpt ( $post = 0 )
Paramètres:
  • (int|WP_Post) $post Optional. Post ID or WP_Post object. Default is global $post.
    Requis: Non
    Défaut:
Retourne:
  • (bool) True if the post has a custom excerpt, false otherwise.
Défini(e) dans:
Codex:

Determines whether the post has a custom excerpt.

For more information on this and similar theme functions, check out the {@link Conditional Tags} article in the Theme Developer Handbook.


Source

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