devel:event:draft_save
Table of Contents
DRAFT_SAVE
- Description:
- Modify draft saving
- DefaultAction:
- saving the draft
- Preventable:
- yes
- Added:
- 2018-07-29
This event is signalled by saveDraft() in inc/Draft.php when a draft is saved during an editing session, handlers can use it to modify the draft or execute additional actions.
Passed Data
This is the data you can use and modify in the event. This is also what is saved in serialized form as a draft at the end.
$data = [ 'id' => 'pageid' 'prefix' => 'text before the edited section', 'text' => 'text of the edited section', 'suffix' => 'text after the edited section', 'date' => '1598944648', // unix timestamp of when editing started 'client' => 'andi', // client identification. user name, ip address // or similar 'cname' => 'data/cache/...', // cache file where the draft is to be saved 'errors' => [], // list of errors that should be shown to the end user ];
See also
- Code related to this event used in any DokuWiki files, plugins and templates
- Configuration Setting: usedraft
devel/event/draft_save.txt · Last modified: 2020-10-27 11:32 by s-sahara