-
-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FEAT: http-equiv meta tags #49
base: master
Are you sure you want to change the base?
Conversation
Forgot to mention that i needed this patch to add a Also noting that it this extension doesn't nothing for pages with content-type: text/plain (makes sense). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The README file needs to be extended, too. I am not sure if the existing integration tests also cover this new parameter.
|
||
$comment = ''; | ||
|
||
if ( !$this->metaPropertyMarkup ) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure if we need this here too, since this HTML comment is already added via the following lines
SemanticMetaTags/src/OutputPageHtmlTagsInserter.php
Lines 120 to 123 in f33ad92
if ( !$this->metaPropertyMarkup ) { | |
$comment .= '<!-- Semantic MetaTags -->' . "\n"; | |
$this->metaPropertyMarkup = true; | |
} |
@@ -140,4 +144,30 @@ private function reqMetaPropertyMarkup( $tag ) { | |||
return false; | |||
} | |||
|
|||
private function reqMetaHttpEquivs( $tag ) { | |||
|
|||
// If a tag contains a `og:` such as `og:title` it is expected to be a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs to be adapted. This is the identical comment copied from the following lines:
SemanticMetaTags/src/OutputPageHtmlTagsInserter.php
Lines 135 to 137 in f33ad92
// If a tag contains a `og:` such as `og:title` it is expected to be a | |
// OpenGraph protocol tag along with other prefixes maintained in | |
// $GLOBALS['smtgMetaPropertyPrefixes'] |
@ankostis Thanks a lot for submitting a pull request. I have commented while doing a first check. It will be great if @JeroenDeDauw could make some comments form a programmers perspective, too. |
That is a quick'n dirty implementation to output
<meta http-equiv="...">
tags.The above html element gets produces only for those tags in
smtgTagsProperties
that exist also in the newsmtgMetaHttpEquivs
GLOBALS array.src/OutputPageHtmlTagsInserter.php
file was modified.