**/ function bel_env($env, $afficher_en_clair = false) { if (!$afficher_en_clair) { $env = str_replace(['"', '''], ['"', '\''], $env); } if (is_array($env_tab = @unserialize($env))) { $env = $env_tab; } if (!is_array($env)) { return ''; } $style = " style='border:1px solid #ddd;'"; $res = "
" . entites_html($nom) . " : | " . $val . " | \n
* - avec plugin version PrismJS :
* - avec plugin version Geshi :
*
* @param string $texte
* @param string $language
* Type de code : html | spip
* @return string
*/
function filtre_dev_afficher_code_dist(string $texte, string $language = ''): string {
include_spip('inc/utils');
$fn_coloration_geshi = (function_exists('coloration_code_color') ? 'coloration_code_color' : null);
$class_pre_color = (test_plugin_actif('coloration_code') ? 'avec-prism' : 'brut');
$language_defaut = ($fn_coloration_geshi ? 'html5' : 'html');
$language = $language ?: $language_defaut;
// Avec coloration Geshi
if ($fn_coloration_geshi) {
$texte = $fn_coloration_geshi($texte, $language);
// Avec ou sans coloration Prism
} else {
include_spip('inc/filtres');
$texte = "" . entites_html(trim($texte)) . '
';
}
return $texte;
}