get_the_password_form()
get_the_password_form( int|WP_Post $post )
检索受保护的post密码表单内容。
Retrieve protected post password form content.
参数(Parameters)
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
$post | (int | WP_Post) | 可选 | Post ID或WP_Post对象。默认值为全局$post。 |
返回(Return)
(string)密码保护邮件的密码表单的HTML内容。
源码(Source)
更新版本 | 源码位置 | 使用 | 被使用 |
---|---|---|---|
1.0.0 | wp-includes/post-template.php:1707 | 1 function | 7 |
笔记(Notes)
例子:
get_the_password_form() 为WP2原创文章,链接:https://www.wp2.cn/functions/get_the_password_form/