configurer_liste_metas

This pipeline is used to supplement (or modify) SPIP’s default configuration parameter values. It accepts a parameter consisting of a table of "name / value" pairs and returns the same as output.

This pipeline is called in ecrire/inc/config.php:

  1. return pipeline('configurer_liste_metas', array(
  2. 'nom_site' => _T('info_mon_site_spip'),
  3. 'adresse_site' => preg_replace(",/$,", "", url_de_base()),
  4. 'descriptif_site' => '',
  5. //...
  6. ));

Download

The config() function is used to supplement the parameters still missing from SPIP but which have a default value defined by the pipeline. It is specifically called from SPIP’s native configuration forms.

  1. $config = charger_fonction('config', 'inc');
  2. $config();

Download

Example

The "Compresseur" extension uses this pipeline to define the default options for the page compression system.

  1. function compresseur_configurer_liste_metas($metas){
  2. $metas['auto_compress_js']='non';
  3. $metas['auto_compress_closure']='non';
  4. $metas['auto_compress_css']='non';
  5. return $metas;
  6. }

Download

Author Mark Baber Published : Updated : 12/05/17

Translations : English, français