updated filter email to filter the author page special keyword

This commit is contained in:
asus
2024-03-07 19:03:42 +01:00
parent 31c3ed55f4
commit 4916defcaa
4 changed files with 55 additions and 29 deletions

View File

@@ -15,19 +15,15 @@ function handle_prof_is_activ_CIPF($author_id) {
$acf_prof_is_activ = PLGNTLS_class::ACF_PROF_IS_ACTIV;
$slug_wait_activation = PLGNTLS_class::SLUG_PROF_INACTIV;
error_log("in handle_prof_is_activ_CIPF");
$acf_id = 'user_' . $author_id;
/*
* if prof is activ, do nothing more
*
*/
error_log("is activ ?");
$is_activ = get_field($acf_prof_is_activ, $acf_id);
if ($is_activ === 'Actif')
return;
error_log("...is inactiv");
/*
@@ -48,8 +44,6 @@ error_log("in handle_prof_is_activ_CIPF");
*
*/
$redirection_prof_inactiv = home_url() . '/' . $slug_wait_activation;
error_log("redirection_prof_inactiv");
error_log($redirection_prof_inactiv);
wp_redirect($redirection_prof_inactiv);
exit;
@@ -65,7 +59,6 @@ function check_prof_page_CIPF() {
// is an author page
if (!is_author())
return;
error_log("in check_prof_page_CIPF");
// the way to find the id of the author of an author_page
$author_id = get_queried_object_id();