public static function isChildPost($postOrPostId = null)
    {
        $post = self::getPost($postOrPostId);
        if (empty($post)) {
            return false;
        }

        return $post->post_parent > 0;
    }
public static function isChildPost($postOrPostId = null)
    {
        $post = self::getPost($postOrPostId);
        if (empty($post)) {
            return false;
        }

        return $post->post_parent > 0;
    }
public static function isChildPost ( $ postOrPostId = null ) { $ post = self :: getPost ( $ postOrPostId ) ; if ( empty ( $ post ) ) { return false ; } return $ post -> post_parent > 0 ; }
Checks if the given post is a child.

@since 3.1.3

@param int|WP_Post|null $postOrPostId Post Instance or Post ID to check

@return boolean
Checks if the given post is a child .