[CSS] +fix page header and title color
[lhc/web/www.git] / www / plugins / verifier / aide / verifier_fonctions.php
1 <?php
2
3 // Sécurité
4 if (!defined('_ECRIRE_INC_VERSION')) {
5 return;
6 }
7
8 include_spip('inc/verifier');
9 include_spip('inc/saisies');
10
11 /*
12 * Génère une page d'aide listant toutes les saisies et leurs options
13 */
14 function verifier_generer_aide() {
15 // On a déjà la liste par saisie
16 $verifications = verifier_lister_disponibles();
17
18 // On construit une liste par options
19 $options = array();
20 foreach ($verifications as $type_verif => $verification) {
21 $options_verification = saisies_lister_par_nom($verification['options'], false);
22 foreach ($options_verification as $nom => $option) {
23 // Si l'option n'existe pas encore
24 if (!isset($options[$nom])) {
25 $options[$nom] = _T_ou_typo($option['options']);
26 }
27 // On ajoute toujours par qui c'est utilisé
28 $options[$nom]['utilisee_par'][] = $type_verif;
29 }
30 ksort($options_verification);
31 $verifications[$type_verif]['options'] = $options_verification;
32 }
33 ksort($options);
34
35 return array(
36 'verifications' => $verifications,
37 'options' => $options
38 );
39 }