added redirection without need of a page, use it for paypal success or failure message already

This commit is contained in:
asus
2024-03-14 10:29:02 +01:00
parent 2f4a5bb9ef
commit ecc072e25b
9 changed files with 124 additions and 131 deletions

View File

@@ -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;
}