EditPage: Refactor getCheckboxes() to allow changing the format
authorBartosz Dziewoński <matma.rex@gmail.com>
Sat, 25 Mar 2017 20:41:03 +0000 (21:41 +0100)
committerBartosz Dziewoński <matma.rex@gmail.com>
Wed, 29 Mar 2017 20:03:22 +0000 (22:03 +0200)
commit078dbb8e566691463276fc34c47cdb1fe676200b
tree8c16870172233738c0176ac0a07a88ed6a965b02
parent142e89424ea9c4ee5b87ba8d8e78714bca18c75d
EditPage: Refactor getCheckboxes() to allow changing the format

getCheckboxes() directly generated the HTML for the
"This is a minor edit" and "Watch this page" checkboxes,
and allowed extensions to add more HTML checkboxes (and
modify existing ones) using the 'EditPageBeforeEditChecks'
hook. This prevents us from ever changing the format of
the HTML (e.g. to use OOUI checkboxes).

Introduce new method getCheckboxesDefinition(), which
generates the checkboxes in a machine-readable format,
with a new hook 'EditPageGetCheckboxesDefinition'.
Rewrite getCheckboxes() in terms of that. The old hook
'EditPageBeforeEditChecks' is now deprecated.

Change-Id: I3dbe973dcac6cba0c3a1ac5d983cafcfb49d833c
RELEASE-NOTES-1.29
docs/hooks.txt
includes/EditPage.php