I’m having a little problem getting an information. In my plugin, I got a situation where I have to throw, in a very specific situation, a 403 error. But I can’t find in the documentation if there is a recommended way to throw a 403, because WP LOVES wrap everything it’s own way.

So! Do you know a way to trigger a 403 manually ?

Thanks

2 Answers
2

Is there any limitation/issue setting/thowing 403 the usual PHP way?

header('HTTP/1.0 403 Forbidden');
die('You are not allowed to access this file.');

Leave a Reply

Your email address will not be published. Required fields are marked *