Je copie ça là car je n'ai pas le temps de mettre ça dans le plugin fonctions_image ce soir, je suis trop en retard.
A tester et à intégrer si c'est bon.
// Transforme les intertitres d'un texte en image typo
function intertitres_typo(){
$arguments = func_get_args();
// On enlève le premier
$texte = array_shift($arguments);
// On créer une chaine listant les options de image_typo
if ($arguments)
$arguments = ', "'.implode('", "', $arguments).'"';
return preg_replace_callback("/<h3[^>]*>(.*?)<\/h3>/is", create_function('$texte', 'return "<h3 class=\"spip\">".image_typo($texte[1]'.$arguments.')."</h3>";'), $texte);
}
--
RastaPopoulos