updated user info shortcode to output author page and format date

This commit is contained in:
asus
2024-03-07 14:51:10 +01:00
parent b8fbd84d53
commit 60f46265c2
6 changed files with 189 additions and 23 deletions

View File

@@ -0,0 +1,34 @@
<?php
function check_prof_page_CIPF() {
//add_action('template_redirect', 'is_prof_activ_CIPF');
}
add_action('init', 'check_prof_page_CIPF');
function is_prof_activ_CIPF() {
$acf_prof_is_activ = PLGNTLS_class::ACF_PROF_IS_ACTIV;
$slug_wait_activation = PLGNTLS_class::SLUG_PROF_INACTIV;
//$current_user = wp_get_current_user();
$user_id = get_current_user_id();
$acf_id = 'user_' . $user_id;
$is_activ = get_field($acf_prof_is_activ, $acf_id);
if (!empty($is_activ))
return;
$redirection_prof_inactiv = home_url() . '/' . $slug_wait_activation;
error_log("redirection_prof_inactiv");
error_log($redirection_prof_inactiv);
wp_redirect($redirection_prof_inactiv);
exit;
}
?>