Last change
on this file since 86397 was
86397,
checked in by cedric@…, 6 years ago
|
amelioration : on utiliser le pipeline formulaire_fond moins intrusif que recuperer_fond
|
File size:
1.1 KB
|
Line | |
---|
1 | <?php |
---|
2 | /** |
---|
3 | * Plugin Facteur |
---|
4 | * (c) 2009-2013 Collectif SPIP |
---|
5 | * Distribue sous licence GPL |
---|
6 | * |
---|
7 | * @package SPIP\Facteur\Pipelines |
---|
8 | */ |
---|
9 | |
---|
10 | if (!defined("_ECRIRE_INC_VERSION")) return; |
---|
11 | |
---|
12 | /** |
---|
13 | * Insertion dans le pipeline recuperer_fond (SPIP) |
---|
14 | * |
---|
15 | * On indique dans le formulaire de configuration de l'identité du site |
---|
16 | * que facteur surchargera l'email configuré ici pour envoyer les emails |
---|
17 | * |
---|
18 | * @param array $flux |
---|
19 | * Le contexte du pipeline |
---|
20 | * @return array $flux |
---|
21 | * Le contexte du pipeline modifé |
---|
22 | */ |
---|
23 | function facteur_formulaire_fond($flux){ |
---|
24 | if(($flux['args']['form'] == 'configurer_identite') |
---|
25 | && (isset($GLOBALS['meta']['facteur_adresse_envoi']) && $GLOBALS['meta']['facteur_adresse_envoi'] == 'oui') |
---|
26 | && (isset($GLOBALS['meta']['facteur_adresse_envoi_email']) && strlen($GLOBALS['meta']['facteur_adresse_envoi_email']) > 0)){ |
---|
27 | $ajout = '<p class="notice">'._T('facteur:message_identite_email').'</p>'; |
---|
28 | $flux['data'] = preg_replace(",(<li [^>]*class=[\"']editer editer_email_webmaster.*>)(.*<label),Uims","\\1".$ajout."\\2",$flux['data'],1); |
---|
29 | } |
---|
30 | return $flux; |
---|
31 | } |
---|
32 | |
---|
33 | ?> |
---|
Note: See
TracBrowser
for help on using the repository browser.