Hi.
Is there a function call (or anything else way) to verify that a post is protected?
Thanks in advance.
Hi.
Is there a function call (or anything else way) to verify that a post is protected?
Thanks in advance.
Do you want a way of checking in php code, or just to confirm it?
I want to check it in php code so that I can do something if the post is protected or not.
In a WordPress plugin or similar you could use post_password_required(postid)
Outside of that, if you google for post_password_required you can find the code behind it (which is in wp-includes/post-template.php) and go from there.
Thank you very much. The post_password_required(postid) is perfect.
Ciao,
Fran
From which WP version post_password_required(postid) works?
From 2.7.1. Confirm?
I have an "undefined function post_password_required()" message when I try my plugin with WP 2.7, while it works with WP 2.7.1.
Sorry... it works well also with WP 2.7 version, I was trying with an older version.
The post_password_required() is defined from WP 2.7 version.
This topic has been closed to new replies.