1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/spip_ynh.git synced 2024-09-03 20:25:59 +02:00
spip_ynh/sources/plugins-dist/medias/modeles/emb_fonctions.php
2015-04-28 17:10:23 +02:00

20 lines
No EOL
446 B
PHP

<?php
if (!defined('_ECRIRE_INC_VERSION')) return;
/**
* Trouver le fond pour embarquer un document avec un mime_type donne
* text_html
* => modeles/text_html.html si il existe,
* => modeles/text.html sinon
*
* @param $mime_type
* @return mixed
*/
function trouver_modele_mime($mime_type){
$fond = preg_replace(',\W,','_',$mime_type);
if (trouve_modele($fond))
return $fond;
else
return preg_replace(',\W.*$,','',$mime_type);
}