[wp-trac] [WordPress Trac] #45262: Block Editor: Respect AUTOSAVE_INTERVAL value
WordPress Trac
noreply at wordpress.org
Fri Nov 2 12:31:41 UTC 2018
#45262: Block Editor: Respect AUTOSAVE_INTERVAL value
-------------------------+-----------------------------
Reporter: aduth | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Editor | Version: 5.0
Severity: normal | Keywords:
Focuses: |
-------------------------+-----------------------------
WordPress specifies the duration after which an autosave should occur in
an editing environment via its `AUTOSAVE_INTERVAL` constant, defaulting to
60 seconds:
https://github.com/WordPress/wordpress-
develop/blob/5d92e0c0a950399c53294a41000305ddcf47efb5/src/wp-includes
/default-constants.php#L343-L345
In the development of the Gutenberg block editor, a value of 10 seconds
was used instead for a more immediate save. This appears to have been
persisted over to its merge into core:
https://github.com/WordPress/wordpress-
develop/blob/c4bffce143d824e0dea0815fcf8adb304fd574e6/src/wp-admin/edit-
form-blocks.php#L262
For compatibility's sake with the existing constant, should one of the
following be considered?
- Change the default value of `AUTOSAVE_INTERVAL` to 10 seconds or another
value (with consideration of impact on dependants, e.g.
[https://github.com/WordPress/wordpress-
develop/blob/5d92e0c0a950399c53294a41000305ddcf47efb5/src/wp-includes
/class-wp-customize-manager.php#L4764 Customize screen])
- Assign the block editor as a factor of the `AUTOSAVE_INTERVAL`, e.g.
`AUTOSAVE_INTERVAL / 6` to keep the 10 second duration, assuming an
unchanged default
- Use the existing default 60 seconds value for the block editor.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/45262>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list