post_permalink

函数
post_permalink ( $post = 0 )
参数
  • (int|WP_Post) $post Optional. Post ID or WP_Post object. Default is global $post.
    Required:
返回值
  • (string|false)
相关
  • get_permalink()
定义位置
相关方法
get_post_permalinkthe_permalinkget_permalink_post_format_linkget_post_format_link
引入
1.0.0
弃用
4.4.0

post_permalink is a WordPress function that generates the permalink for a post. 它接受一个参数,$post_id(文章的ID),并以字符串形式返回固定链接。

从文章ID中检索固定链接。

function post_permalink( $post = 0 ) {
	_deprecated_function( __FUNCTION__, '4.4.0', 'get_permalink()' );

	return get_permalink( $post );
}

常见问题

FAQs
查看更多 >
闪电侠

(工作日 10:00 - 18:30 为您服务)

2025-12-14 16:36:35

您好,无论是售前、售后、意见建议……均可通过联系工单与我们取得联系。

您也可选择聊天工具与我们即时沟通或点击查看:

您的工单我们已经收到,我们将会尽快跟您联系!
取消
选择聊天工具: