- foreach ($lc as $i=>$link) {
- //var_dump($link->getAttribute('href'));
-
- if ($link->getAttribute('rel') != 'stylesheet') {
- continue;
- }
- $url = $link->getAttribute('href');
- $file = $ff->rootDir . $url;
-
- if (!preg_match('#^(http|https)://#', $url)) {
- $file = $ff->rootDir . $url;
-
- if (!file_exists($file)) {
-// echo $file;
- $link->setAttribute('href', 'missing:' . $file);
- continue;
- }
- } else {
- $file = $this->mapurl($url);
- }
-
- $par = $link->parentNode;
- $par->removeChild($link);
- $s = $dom->createElement('style');
- $e = $dom->createTextNode(file_get_contents($file));
- $s->appendChild($e);
- $par->appendChild($s);
-
- }
+ $head = $dom->getElementsByTagName('head');
+
+ $s = $dom->createElement('style');
+ $e = $dom->createTextNode($this->css_inline);
+ $s->appendChild($e);
+ $head->appendChild($s);
+