updated user info shortcode to output author page and format date
This commit is contained in:
34
plugins/fipfcard_plugin/php/prof_check_page.php
Normal file
34
plugins/fipfcard_plugin/php/prof_check_page.php
Normal 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;
|
||||
}
|
||||
|
||||
|
||||
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user