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

@@ -17,9 +17,9 @@ if (!defined('ABSPATH')) {
*
*/
function send_registration_email_CIPF($send, $user) {
PLGNTLS_class::debug_infos();
$role_partner = PLGNTLS_class::ROLE_PARTNER;
$role_prof = PLGNTLS_class::ROLE_PROF;
Plgntls::debug_infos();
$role_partner = Plgntls::ROLE_PARTNER;
$role_prof = Plgntls::ROLE_PROF;
if (user_can($user, $role_prof)) {
$send = is_email_registration_prof_CIPF();
@@ -46,7 +46,7 @@ add_filter( 'wp_send_new_user_notification_to_user', 'send_registration_email_CI
*
*/
function filter_regitration_email_CIPF($wp_new_user_notification_email, $user, $blogname) {
PLGNTLS_class::debug_infos();
Plgntls::debug_infos();
$wp_new_user_notification_email['message'] = get_email_registration_CIPF();
return $wp_new_user_notification_email;
}
@@ -64,8 +64,8 @@ add_filter('wp_new_user_notification_email', 'filter_regitration_email_CIPF', 21
*/
function set_email_registration_CIPF($email, $is_email_prof, $is_email_partner) {
PLGNTLS_class::debug_infos();
$option_email = PLGNTLS_class::OPTION_EMAIL;
Plgntls::debug_infos();
$option_email = Plgntls::OPTION_EMAIL;
$option_data = array();
$option_data['email'] = $email;
@@ -77,8 +77,8 @@ function set_email_registration_CIPF($email, $is_email_prof, $is_email_partner)
function get_email_registration_option_CIPF() {
PLGNTLS_class::debug_infos();
$option_email = PLGNTLS_class::OPTION_EMAIL;
Plgntls::debug_infos();
$option_email = Plgntls::OPTION_EMAIL;
$email_option_serialized = get_option($option_email['_name']);
if (false === $email_option_serialized) {
@@ -93,18 +93,18 @@ function get_email_registration_option_CIPF() {
function get_email_registration_CIPF() {
PLGNTLS_class::debug_infos();
Plgntls::debug_infos();
$email_option = get_email_registration_option_CIPF();
return $email_option['email'];
}
function is_email_registration_prof_CIPF() {
PLGNTLS_class::debug_infos();
Plgntls::debug_infos();
$email_option = get_email_registration_option_CIPF();
return $email_option['is_email_prof'];
}
function is_email_registration_partner_CIPF() {
PLGNTLS_class::debug_infos();
Plgntls::debug_infos();
$email_option = get_email_registration_option_CIPF();
return $email_option['is_email_partner'];
}