wip author page checks, waiting page redirection working

This commit is contained in:
asus
2024-03-07 17:50:45 +01:00
parent d65af4cd43
commit 31c3ed55f4
4 changed files with 50 additions and 22 deletions

View File

@@ -14,6 +14,8 @@ function restrict_author_page_CIPF() {
if (!is_author())
return;
error_log("in restrict_author_page_CIPF");
$can_access = false;
if (current_user_can('administrator')) {
$can_access = true;
@@ -33,7 +35,7 @@ function restrict_author_page_CIPF() {
exit;
}
}
add_action('template_redirect', 'restrict_author_page_CIPF');
add_action('template_redirect', 'restrict_author_page_CIPF', 10);