source: spip-zone/_plugins_/basecss/basecss_pipelines.php @ 47903

Last change on this file since 47903 was 46641, checked in by romy@…, 10 years ago

Changement de prefix

File size: 651 bytes
Line 
1<?php
2
3/**
4 * Inserer le head avant la premiere css du head
5 * @param string $head
6 * @return string
7 */
8function basecss_pied_de_biche($head){
9        $search = "<link";
10        if (preg_match(",<link\s[^>]*stylesheet,Uims", $head, $match))
11                $search = $match[0];
12        $p = stripos($head, $search);
13        $h = recuperer_fond('inclure/basecss-head',array());
14        $h = "\n".trim($h)."\n";
15
16        $head = substr_replace($head, $h, $p, 0);
17        return $head;
18}
19
20/**
21 * Inserer le pied de biche dans le head
22 *
23 * @param string $flux
24 * @return string
25 */
26function basecss_insert_head($flux){
27        $flux .= "<"."?php header(\"X-Spip-Filtre: basecss_pied_de_biche\"); ?".">";
28        return $flux;
29}
30?>
Note: See TracBrowser for help on using the repository browser.