Since commit df49428, the $OutputPage::mLinktags property has been protected. This broke my hook code, which was inspecting the link tag array to see whether the page already had a rel=canonical tag before adding one.
This wouldn't be a big issue (as the code needed updating for MW 1.24 anyway), if there was an accessor method that I could use instead, but unfortunately no such method exists. Effectively, as far as extension code is concerned, this field is currently write-only.
I'd thus like to request that either:
- the mLinktags (and, while we're at it, mMetatags and mCanonicalUrl) properties of the OutputPage class should be made public, or
- accessor methods should be added to allow extension code to examine these fields.
(Ps. I managed to rewrite that particular hook not to require access to these OutputPage properties, but it's not quite as fail-safe as it used to be -- there's a chance that the new code may stomp on a rel=canonical URL set by a later MediaWiki version or another extension. In any case, I would expect these fields to be of general interest to extension authors, even if they're not strictly necessary for my specific use case.)
For a similar case about styles, see T76461.
For a similar case about mCoreRights, see T76264.
For a similar case about mLinktags, see T76168.