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:

return pipeline('configurer_liste_metas', array(
    'nom_site' => _T('info_mon_site_spip'),
    'adresse_site' => preg_replace(",/$,", "", url_de_base()),
    'descriptif_site' => '',
    //...
));

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.

$config = charger_fonction('config', 'inc');
$config();

Example

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

function compresseur_configurer_liste_metas($metas){
    $metas['auto_compress_js']='non';
    $metas['auto_compress_closure']='non';
    $metas['auto_compress_css']='non';
    return $metas;
}

Author Mark Baber Published :

Translations : English, français