首页 WordPress函数大全 post_password_required()

post_password_required()

2020-05-02 / 5190阅 / 悠然

如何你看完本文还不知道如何使用该函数,可以联系我定制视频教程,50元/个函数,学不会全额退款

post_password_required( int|WP_Post|null $post = null )

是否张贴要求密码,并提供了正确的密码。

描述

参数

$post

(int|WP_Post|null)
(Optional)
An optional post. Global $post used if not provided.

Default value: null

返回

(bool) false if a password is not required or the correct password cookie is present, true otherwise.

大家谈论
    我的见解