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
Feature request: Allow callable fallbacks for $smtgTagsProperties #61
Comments
Thanks for creating the issue.
This assumes that something is set to the meta element, e.g. description, I guess. Thus I still need to set it somehow? |
I am not sure if I understand your question correctly. An example of a callback "property" assigned to a metatag can be seen in the commit message to my pull request #62, which you are kindly invited to review. A callback function can return string constants as well, making |
Is this extension still maintained? |
Anybody at home? |
This change addresses the feature request #61.
@alex-mashin Will do a release soon, probably later this day. Thanks a lot! |
Proposal: if
$smtgTagsProperties['tag name']
or$smtgTagsProperties['tag name'][some index]
is callable, call it, passingOutputPage &$out
and perhapsParserOutput $parserOutput
to it, and assign the return, if it does not evaluate to false, to the meta tag.Reason: property values are not always set, but a non-semantic fallback can often be found. However, this fallback value should usually depend on the current page and localised messages, and trying to access both from
LocalSettings.php
gives horrible results, to the point of effectively breaking MediaWiki.This feature can totally replace
$smtgTagsStrings
, also resolving #60.The text was updated successfully, but these errors were encountered: