wip debug redirections

This commit is contained in:
asus
2024-03-14 12:31:31 +01:00
parent ecc072e25b
commit 76f2e8ba00
14 changed files with 165 additions and 29 deletions

View File

@@ -114,16 +114,24 @@ function show_prof_paiement_messages_CIPF($user_id) {
*/
function check_prof_page_CIPF() {
PLGNTLS_class::debug_infos();
$slug = get_post_field( 'post_name', get_post() );
error_log("slug");
error_log($slug);
// is an author page
if (!is_author())
return;
PLGNTLS_class::debug_infos();
// the way to find the id of the author of an author_page
$author_id = get_queried_object_id();
handle_prof_is_activ_CIPF($author_id);
PLGNTLS_class::debug_infos();
show_prof_paiement_messages_CIPF($author_id);
PLGNTLS_class::debug_infos();
}
add_action('template_redirect', 'check_prof_page_CIPF', 11);