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



has_post_parent › WordPress Function

Depuis5.7.0
Dépréciéen/a
has_post_parent ( $post = null )
Paramètres:
  • (int|WP_Post|null) $post Optional. Post ID or WP_Post object. Default is global $post.
    Requis: Non
    Défaut: null
Retourne:
  • (bool) Whether the post has a parent post.
Défini(e) dans:
Codex:

Returns whether the given post has a parent post.



Source

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