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

@@ -15,9 +15,9 @@ if (!defined('ABSPATH')) {
* hide admin bar if access a front page and is not an admin
*/
function hide_admin_bar_CIPF() {
PLGNTLS_class::debug_infos(2);
$role_admin = PLGNTLS_class::ROLE_ADMIN;
$role_fipf = PLGNTLS_class::ROLE_FIPF;
Plgntls::debug_infos(2);
$role_admin = Plgntls::ROLE_ADMIN;
$role_fipf = Plgntls::ROLE_FIPF;
/*
@@ -27,7 +27,7 @@ function hide_admin_bar_CIPF() {
if (is_admin()) {
return;
}
PLGNTLS_class::debug_infos();
Plgntls::debug_infos();
/*
@@ -53,9 +53,9 @@ add_action('after_setup_theme', 'hide_admin_bar_CIPF');
*
*/
function restrict_admin_access_CIPF() {
PLGNTLS_class::debug_infos(2);
$role_admin = PLGNTLS_class::ROLE_ADMIN;
$role_fipf = PLGNTLS_class::ROLE_FIPF;
Plgntls::debug_infos(2);
$role_admin = Plgntls::ROLE_ADMIN;
$role_fipf = Plgntls::ROLE_FIPF;
/*
* this concerns logged_in users, for admin page
@@ -67,7 +67,7 @@ function restrict_admin_access_CIPF() {
if (!is_admin()) {
return;
}
PLGNTLS_class::debug_infos();
Plgntls::debug_infos();
/*
* some roles are allowed to access the admin panel