changed acf field access from _name to _key

This commit is contained in:
asus
2024-03-19 15:05:33 +01:00
parent aad98c5188
commit 2f0b15dd6f
6 changed files with 80 additions and 33 deletions

View File

@@ -112,7 +112,7 @@ if (!defined('ABSPATH')) {
* early checks on profil page
*
*/
function check_prof_profil_CIPF() {
function prof_profil_check_CIPF() {
PLGNTLS_class::debug_infos();
// is an author page
@@ -122,17 +122,20 @@ function check_prof_profil_CIPF() {
// the way to find the id of the author of an author_page
$author_id = get_queried_object_id();
/*
* in case event didn't fire, change account to expire here
*
*/
if (is_card_date_expired_CIPF) {
if (!is_account_expired_CIPF) {
set_account_expired_CIPF;
if (card_date_exists_CIPF()) {
if (is_card_date_expired_CIPF()) {
if (!is_account_expired_CIPF()) {
set_account_expired_CIPF();
}
}
}
}
add_action('template_redirect', 'check_prof_page_CIPF', 11);
add_action('wp', 'prof_profil_check_CIPF', 11);
@@ -141,7 +144,7 @@ add_action('template_redirect', 'check_prof_page_CIPF', 11);
* if profil needs redirection, it happens here
*
*/
function check_prof_page_CIPF() {
function prof_profil_redirects_CIPF() {
PLGNTLS_class::debug_infos();
// is an author page
@@ -154,7 +157,7 @@ function check_prof_page_CIPF() {
// redirections here
}
add_action('template_redirect', 'redirect_prof_page_CIPF', 11);
add_action('template_redirect', 'prof_profil_redirects_CIPF', 11);
@@ -163,7 +166,7 @@ add_action('template_redirect', 'redirect_prof_page_CIPF', 11);
* time to upload some scripts and styles on prof profil page
*
*/
function check_prof_profil_CIPF() {
function prof_profil_scripts_CIPF() {
PLGNTLS_class::debug_infos();
// is an author page
@@ -174,9 +177,9 @@ function check_prof_profil_CIPF() {
$author_id = get_queried_object_id();
$cipf_prof = new PLGNTLS_class();
$cipf_renew->add_to_front();
$cipf_prof->add_to_front();
}
add_action('wp_enqueue_scripts', 'check_prof_page_CIPF', 11);
add_action('wp_enqueue_scripts', 'prof_profil_scripts_CIPF', 11);