钩子文档

the_guid

💡 云策文档标注

概述

the_guid 是一个 WordPress 过滤器,用于修改或过滤已转义的帖子全局唯一标识符(guid)。它允许开发者在输出 guid 时进行自定义处理。

关键要点

  • 过滤器名称:the_guid
  • 参数:$post_guid(已转义的帖子 guid 字符串)和 $post_id(帖子 ID)
  • 相关函数:与 get_the_guid() 和 the_guid() 函数关联
  • 引入版本:WordPress 4.2.0

📄 原文内容

Filters the escaped Global Unique Identifier (guid) of the post.

Description

See also

Parameters

$post_guidstring
Escaped Global Unique Identifier (guid) of the post.
$post_idint
The post ID.

Source

echo apply_filters( 'the_guid', $post_guid, $post_id );

Changelog

Version Description
4.2.0 Introduced.