added redirection without need of a page, use it for paypal success or failure message already
This commit is contained in:
@@ -41,6 +41,8 @@ function restrict_author_page_CIPF() {
|
||||
$current_user_id = get_current_user_id();
|
||||
|
||||
if ($current_user_id != $author_id) {
|
||||
// Set up nocache headers before redirecting : https://developer.wordpress.org/reference/functions/wp_safe_redirect/#user-contributed-notes
|
||||
nocache_headers();
|
||||
wp_redirect(home_url(), 301);
|
||||
exit;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user