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:
@@ -17,8 +17,8 @@ if (!defined('ABSPATH')) {
|
||||
*
|
||||
*/
|
||||
function partner_page_scripts_CIPF() {
|
||||
PLGNTLS_class::debug_infos(2);
|
||||
$role_partner = PLGNTLS_class::ROLE_PARTNER;
|
||||
Plgntls::debug_infos(2);
|
||||
$role_partner = Plgntls::ROLE_PARTNER;
|
||||
|
||||
/*
|
||||
* dont do anything if :
|
||||
@@ -37,7 +37,7 @@ function partner_page_scripts_CIPF() {
|
||||
if (is_null($post)) {
|
||||
return;
|
||||
}
|
||||
PLGNTLS_class::debug_infos();
|
||||
Plgntls::debug_infos();
|
||||
$current_post_author = (int)($post->post_author);
|
||||
$current_user_id = (int)get_current_user_id();
|
||||
if ($current_user_id !== $current_post_author) {
|
||||
@@ -48,8 +48,7 @@ function partner_page_scripts_CIPF() {
|
||||
* on partner own page, load css
|
||||
*
|
||||
*/
|
||||
$cipf_partner = new PLGNTLS_class();
|
||||
$cipf_partner->add_to_front(array('css/partner_page.css'));
|
||||
Plgntls::add_to_front(array('css/partner_page.css'));
|
||||
}
|
||||
add_action('wp_enqueue_scripts', 'partner_page_scripts_CIPF', 11);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user