EditPage saving can be prevented by three different hooks:
- EditPage::attemptSave has one parameter, an EditPage object
- EditFilter has 5 parameters:
- An EditPage object
- A string representing the new text (textbox1)
- A string representing the section being edited
- A string passed by reference to represent the hook error
- A string representing the summary for the edit
- EditFilterMergedContent has 6 parameters:
- An IContextSource for the edit
- A Content object for the new page content
- A Status object for hooks to modify
- A string representing the summary for the edit
- A User object for the user making the edit
- A boolean for whether the edit is being marked as minor
After saving, but within the ::attemptSave method used by both action=edit and the api, EditPage::attemptSave:after is run with the following parameters:
- An EditPage object
- The Status object the method will return
- An array with the result details that can be modified
Current hook handlers assume that all four hooks will be called when an edit is saved via either action=edit or the edit api. To be able to factor out a backend, I propose that EditPage::attemptSave, EditFilter, and EditPage::attemptSave:after all be deprecated and then removed.
Deployed uses:
Both EditPage::attemptSave and EditPage::attemptSave:after are only used by WikiEditor (2010)
EditFilter is only used by SpamBlacklist and TitleBlacklist