Closed alex-mashin closed 4 years ago
Thanks for creating the issue.
also resolving #60.
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 $smtgTagsStrings
redundant, and, in combination with the $smtgTagsPropertyFallbackUsage = true
setting, it can achieve your goal in #60.
Is this extension still maintained?
Anybody at home?
@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.