I am noob at php, but I need to alter a script a tiny bit.
It looks through a HTML template and looks for the <head>
, and then just after it - it adds a pre-defined content (css and javascript paths etc) for the <head>
area in the HTML output.
Now the function looks like:
$template = preg_replace('/<head(.*?)\>(.*?)/is', "<head\\1>".'[|EXTRAHEADER|]'
I see that this takes ALL areas that start with that is inside a new theme I am working with.
How can I change the above identifier/ what it looks for - so it does NOT choose
<header...
but only
<head...
?
I imagine the original owner of the script has done the above to accept people to use both <head>
and <head >
, but I really don't know for sure.
For me it is just important that this script does not try to add all css etc "head content", to other places in the HTML document than in the HTML-head.