get_the_guid example


function get_comment_guid( $comment_id = null ) {
    $comment = get_comment( $comment_id );

    if ( ! is_object( $comment ) ) {
        return false;
    }

    return get_the_guid( $comment->comment_post_ID ) . '#comment-' . $comment->comment_ID;
}

/** * Displays the link to the comments. * * @since 1.5.0 * @since 4.4.0 Introduced the `$comment` argument. * * @param int|WP_Comment $comment Optional. Comment object or ID. Defaults to global comment object. */
function comment_link( $comment = null ) {
    
// It's a newly-uploaded file, therefore $file is relative to the basedir.                 $url = $uploads['baseurl'] . "/$file";
            }
        }
    }

    /* * If any of the above options failed, Fallback on the GUID as used pre-2.7, * not recommended to rely upon this. */
    if ( ! $url ) {
        $url = get_the_guid( $post->ID );
    }

    // On SSL front end, URLs should be HTTPS.     if ( is_ssl() && ! is_admin() && 'wp-login.php' !== $pagenow ) {
        $url = set_url_scheme( $url );
    }

    /** * Filters the attachment URL. * * @since 2.1.0 * * @param string $url URL for the given attachment. * @param int $attachment_id Attachment post ID. */

function the_guid( $post = 0 ) {
    $post = get_post( $post );

    $post_guid = isset( $post->guid ) ? get_the_guid( $post ) : '';
    $post_id   = isset( $post->ID ) ? $post->ID : 0;

    /** * Filters the escaped Global Unique Identifier (guid) of the post. * * @since 4.2.0 * * @see get_the_guid() * * @param string $post_guid Escaped Global Unique Identifier (guid) of the post. * @param int $post_id The post ID. */
Home | Imprint | This part of the site doesn't use cookies.