mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-05 17:51:40 +09:00
issue 1968 add meta tag in html head.
git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.3.1@10960 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
cd4650b6d8
commit
bbc2adb855
1 changed files with 13 additions and 0 deletions
|
|
@ -93,6 +93,9 @@ class HTMLDisplayHandler {
|
|||
// move <style ..></style> in body to the header
|
||||
$output = preg_replace_callback('!<style(.*?)<\/style>!is', array($this,'_moveStyleToHeader'), $output);
|
||||
|
||||
// move <meta ../> in body to the header
|
||||
$output = preg_replace_callback('!<meta(.*?)(?:\/|)>!is', array($this,'_moveMetaToHeader'), $output);
|
||||
|
||||
// change a meta fine(widget often put the tag like <!--Meta:path--> to the content because of caching)
|
||||
$output = preg_replace_callback('/<!--(#)?Meta:([a-z0-9\_\/\.\@]+)-->/is', array($this,'_transMeta'), $output);
|
||||
|
||||
|
|
@ -238,6 +241,16 @@ class HTMLDisplayHandler {
|
|||
Context::addHtmlHeader($matches[0]);
|
||||
}
|
||||
|
||||
/**
|
||||
* add meta code extracted from html body to Context, which will be
|
||||
* printed inside <header></header> later.
|
||||
* @param array $matches
|
||||
* @return void
|
||||
**/
|
||||
function _moveMetaToHeader($matches) {
|
||||
Context::addHtmlHeader($matches[0]);
|
||||
}
|
||||
|
||||
/**
|
||||
* add given .css or .js file names in widget code to Context
|
||||
* @param array $matches
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue