get_the_guid()
最后更新于:2021-11-27 02:07:28
get_the_guid( int|GC_Post$post)Retrieve the Post Global Unique Identifier (guid).
参数
- $post
-
(int|GC_Post) (Optional) Post ID or post object. Default is global $post.
响应
(string)
源文件
文件: gc-includes/post-template.php
function get_the_guid( $post = 0 ) {
$post = get_post( $post );
$guid = isset( $post->guid ) ? $post->guid : '';
$id = isset( $post->ID ) ? $post->ID : 0;
/**
* Filters the Global Unique Identifier (guid) of the post.
*
* @since 1.5.0
*
* @param string $guid Global Unique Identifier (guid) of the post.
* @param int $id The post ID.
*/
return apply_filters( 'get_the_guid', $guid, $id );
}