') === false
and strpos($flux['data']['texte'], '
$flux['data']['texte'], 'contexte' => $flux['args']['contexte']));
}
return $flux;
}
/**
* Insertion dans le pipeline affichage_final (SPIP)
* Remplace/ajoute des metas et title a celles du
*
* @param string $flux
* Le contenu de la page
* @return string
* Le contenu de la page modifiée
*/
function seo_affichage_final($flux) {
#$t = spip_timer();
/**
* On n'agit que si on a un head
* sinon c'est tout et n'importe quoi
*/
if ($GLOBALS['html']
and stripos($flux, '') !== false
and strpos($flux, '') === false
and include_spip('inc/config')
and lire_config('seo/insert_head/activate', 'no') == 'yes'
and ($ps = stripos($flux, '')) !== false
and ($pe = stripos($flux, '')) !== false
and $pe > $ps
and $head = substr($flux, $ps+6, $pe-$ps-6)
) {
$head_new = recuperer_fond('inclure/seo-head', array('head' => $head, 'contexte' => $GLOBALS['contexte']));
$flux = str_replace($head, $head_new, $flux);
}
#var_dump(spip_timer());
return $flux;
}