Dedicated ticket for what I posted at T30856#10981711:
If you are interested in cleaning up additional remnants:
- Exhaustive search, that looks for:
- [iI]d.{1,10}'toolbar'
- [iI]d.{1,10}"toolbar"
- #toolbar
- getEditToolbar
- onEditPageBeforeEditToolbar
- EditPageBeforeEditToolbar
- removeDefaultToolbar (Extension:TinyMCE)
- Notes:
- There are some false positives, as some skins/extensions implemented unrelated—but identically named—elements with id "toolbar".
- I'm excluding 3 files from Extension:Wikibase that had false positives on getEditToolbar.
- Targeted search, that looks specifically for this subset:
- getEditToolbar
- onEditPageBeforeEditToolbar
- EditPageBeforeEditToolbar
- removeDefaultToolbar (Extension:TinyMCE)
Note that there is no WMF extension that adds a toolbar using the hook. See how Extension:JsonData and Extension:TinyMCE use the hook to remove the toolbar, but nowadays the toolbar is no longer appended initially.
Therefore, I think the next logical cleanup step would be to remove all remaining usages of the hook—followed by the hook itself. The same applies to getEditToolbar, which now returns only an empty string.
I'm interested in the targeted search as a first step, focusing on the hook and getEditToolbar().
- After the toolbar was removed, the hook was preserved to allow extensions to inject a custom toolbar. However, no WMF skin or extension currently uses this hook to inject a toolbar. Some extensions do use the hook to remove the toolbar—but since the toolbar is no longer present, those invocations are now redundant.
- Similarly, although getEditToolbar() is still called in some places, it now always returns an empty string, making it effectively obsolete.