You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
44 lines
920 B
44 lines
920 B
<?php |
|
|
|
/** |
|
* Fonctions internes du plugin |
|
*/ |
|
|
|
if (!defined('_ECRIRE_INC_VERSION')) { |
|
return; |
|
} |
|
|
|
include_spip('inc/config'); |
|
/** |
|
* Détecter si au moins un service est actif. |
|
* |
|
* @return boolean |
|
*/ |
|
|
|
function tarteaucitron_actif() { |
|
$actif = false; |
|
$liste_services = lire_config('tarteaucitron/services', array()); |
|
foreach ($liste_services as $value) { |
|
if (!empty($value)) { |
|
$actif = true; |
|
} |
|
} |
|
return $actif; |
|
} |
|
|
|
/** |
|
* Récupérer les js correspondants aux services activés |
|
* |
|
* @return boolean | string |
|
*/ |
|
|
|
function tarteaucitron_liste_services_actifs($objet, $id_objet) { |
|
|
|
$services_actifs = array_filter(lire_config('tarteaucitron/services', array())); |
|
$ajouter_services = $objet = $id_objet = ''; |
|
foreach ($services_actifs as $service => $value) { |
|
$ajouter_services .= recuperer_fond('services/'.$service, array('objet' => $objet, 'id_objet' => $id_objet)); |
|
} |
|
|
|
return $ajouter_services; |
|
}
|
|
|