wpseek.com
Uma área de pesquisa sobre o WordPress para devs e autores do tema



has_excerpt › WordPress Function

Desde2.3.0
Obsoleton/a
has_excerpt ( $post = 0 )
Parâmetros:
  • (int|WP_Post) $post Optional. Post ID or WP_Post object. Default is global $post.
    Required: No
    Padrão:
Retorna:
  • (bool) True if the post has a custom excerpt, false otherwise.
Definido em:
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.


Fonte

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