The addPortletLink method has become a vital function for gadgets to extend MediaWiki functionality, however it has room for improvement.
The function should have better support for icons.
Acceptance criteria
- Calls using the old function signature addPortletLink(portletId, href, text, [id], [tooltip], [accesskey], [nextnode]) → {HTMLElement|null}static # continue to work
- A simplified 2 parameter version of the function is provided- addPortletLink(portletId, options) where keys in options correspond with the old function parameters.
- The options are passed in the util.addPortletLink hook so skins can read them.
- Documentation is updated and documents that skins may extend options with their own options (for example icons)
- Vector 2022 is updated to generate icon CSS using mw.util.addCSS