updated plgntls :

- renamed PLGNTLS_class -> Plgntls
- changed method 'add_to_front()' to static method
- moved fetch script as inline script, so the plgntls file is single
- improved the way inline script and styles are added
This commit is contained in:
asus
2024-03-29 21:56:12 +01:00
parent 42e8cbc4e9
commit ade0be87ce
41 changed files with 457 additions and 421 deletions

View File

@@ -16,9 +16,9 @@ if (!defined('ABSPATH')) {
*
*/
function prof_after_form_transfert_validation_CIPF($form_id, $post_array, $form_type) {
PLGNTLS_class::debug_infos();
$acf_account_state = PLGNTLS_class::ACF_ACCOUNT_STATE;
$form_prof_transfert_id = PLGNTLS_class::FORM_PROF_TRANSFERT_ID;
Plgntls::debug_infos();
$acf_account_state = Plgntls::ACF_ACCOUNT_STATE;
$form_prof_transfert_id = Plgntls::FORM_PROF_TRANSFERT_ID;
if ($form_prof_transfert_id !== $form_id) {
return;
@@ -41,12 +41,12 @@ add_action('df_after_process', 'prof_after_form_transfert_validation_CIPF', 10,
*
*/
function prof_profil_check_CIPF() {
PLGNTLS_class::debug_infos(2);
Plgntls::debug_infos(2);
// is an author page
if (!is_author())
return;
PLGNTLS_class::debug_infos();
Plgntls::debug_infos();
// the way to find the id of the author of an author_page
$author_id = get_queried_object_id();
@@ -64,10 +64,10 @@ add_action('wp', 'prof_profil_check_CIPF', 11);
*
*/
function prof_profil_redirects_CIPF() {
PLGNTLS_class::debug_infos(2);
$role_fipf = PLGNTLS_class::ROLE_FIPF;
$role_admin = PLGNTLS_class::ROLE_ADMIN;
$role_partner = PLGNTLS_class::ROLE_PARTNER;
Plgntls::debug_infos(2);
$role_fipf = Plgntls::ROLE_FIPF;
$role_admin = Plgntls::ROLE_ADMIN;
$role_partner = Plgntls::ROLE_PARTNER;
// is an author page
if (!is_author())
@@ -76,7 +76,7 @@ function prof_profil_redirects_CIPF() {
if (et_fb_is_enabled()) {
return;
}
PLGNTLS_class::debug_infos();
Plgntls::debug_infos();
/*
@@ -130,12 +130,12 @@ add_action('template_redirect', 'prof_profil_redirects_CIPF', 11);
*
*/
function prof_profil_scripts_CIPF() {
PLGNTLS_class::debug_infos(2);
Plgntls::debug_infos(2);
// is an author page
if (!is_author())
return;
PLGNTLS_class::debug_infos();
Plgntls::debug_infos();
// the way to find the id of the author of an author_page
$author_id = get_queried_object_id();