wpseek.com
Bazujące na WordPress narzędzie wyszukiwania dla deweloperów i twórców motywów.



has_excerpt › WordPress Function

Od2.3.0
Przestarzałyn/a
has_excerpt ( $post = 0 )
Parametry:
  • (int|WP_Post) $post Optional. Post ID or WP_Post object. Default is global $post.
    Wymagane: Nie
    Domyślny:
Powrót:
  • (bool) True if the post has a custom excerpt, false otherwise.
Zdefiniowane na:
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.


Źródło

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