moved css from site to plugin
This commit is contained in:
@@ -48,7 +48,6 @@ include_once(Plgntls::root_path() . 'php/partners_register.php');
|
||||
include_once(Plgntls::root_path() . 'php/partners_page.php');
|
||||
include_once(Plgntls::root_path() . 'php/display_css.php');
|
||||
include_once(Plgntls::root_path() . 'php/payments.php');
|
||||
include_once(Plgntls::root_path() . 'php/email_registration.php');
|
||||
include_once(Plgntls::root_path() . 'php/random_posts.php');
|
||||
|
||||
|
||||
|
||||
3
plugins/cipf_plugin/css/display_states/_default.css
Normal file
3
plugins/cipf_plugin/css/display_states/_default.css
Normal file
@@ -0,0 +1,3 @@
|
||||
[class*='cipf_display_'] {
|
||||
display: none !important;
|
||||
}
|
||||
@@ -1,3 +1,3 @@
|
||||
div.partenaire_propre_page_cipf {
|
||||
display: block;
|
||||
.partenaire_propre_page_cipf {
|
||||
display: none;
|
||||
}
|
||||
|
||||
3
plugins/cipf_plugin/css/partner_page_own.css
Normal file
3
plugins/cipf_plugin/css/partner_page_own.css
Normal file
@@ -0,0 +1,3 @@
|
||||
div.partenaire_propre_page_cipf {
|
||||
display: block;
|
||||
}
|
||||
@@ -14,6 +14,7 @@ if (!defined('ABSPATH')) {
|
||||
function display_page_css_CIPF($user_id = null) {
|
||||
Plgntls::debug_infos();
|
||||
$css_for_states = array();
|
||||
Plgntls::add_to_front(array('css/display_states/_default.css'));
|
||||
|
||||
/*
|
||||
* etat paiement
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* it means someone outside wp is accessing the file, in this case kill it.
|
||||
*/
|
||||
if (!defined('ABSPATH')) {
|
||||
die('You can not access this file!');
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
?>
|
||||
@@ -19,12 +19,18 @@ if (!defined('ABSPATH')) {
|
||||
function partner_page_scripts_CIPF() {
|
||||
Plgntls::debug_infos(2);
|
||||
$role_partner = Plgntls::ROLE_PARTNER;
|
||||
if (!is_single()) {
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
* dont do anything if :
|
||||
* - user not logged in
|
||||
* - user no partner
|
||||
* - partner not author of the page
|
||||
* if on post, load css to hide partner own stuff
|
||||
*
|
||||
*/
|
||||
Plgntls::add_to_front(array('css/partner_page.css'));
|
||||
|
||||
/*
|
||||
* then check if is partner own page
|
||||
*
|
||||
*/
|
||||
if (!is_user_logged_in()) {
|
||||
@@ -45,10 +51,10 @@ function partner_page_scripts_CIPF() {
|
||||
}
|
||||
|
||||
/*
|
||||
* on partner own page, load css
|
||||
* on partner own page, load css to show own stuff
|
||||
*
|
||||
*/
|
||||
Plgntls::add_to_front(array('css/partner_page.css'));
|
||||
Plgntls::add_to_front(array('css/partner_page_own.css'));
|
||||
}
|
||||
add_action('wp_enqueue_scripts', 'partner_page_scripts_CIPF', 11);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user