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



has_post_parent › WordPress Function

Od5.7.0
Przestarzałyn/a
has_post_parent ( $post = null )
Parametry:
  • (int|WP_Post|null) $post Optional. Post ID or WP_Post object. Default is global $post.
    Wymagane: Nie
    Domyślny: null
Powrót:
  • (bool) Whether the post has a parent post.
Zdefiniowane na:
Codex:

Returns whether the given post has a parent post.



Źródło

function has_post_parent( $post = null ) {
	return (bool) get_post_parent( $post );
}