25% off ProSNIPC25OFF

Change Editor Autosave Interval

Extends the Block Editor autosave interval to 2 minutes (default is 60 seconds) to reduce unnecessary revision noise.

PHPby SnipCraft
php
<?php
// Increase the Block Editor autosave interval (in seconds). Default is 60.
// Override via the scseed_autosave_seconds filter if needed.
add_filter( 'block_editor_settings_all', 'scseed_set_autosave_interval' );
if ( ! function_exists( 'scseed_set_autosave_interval' ) ) {
    function scseed_set_autosave_interval( $settings ) {
        $settings['autosaveInterval'] = (int) apply_filters( 'scseed_autosave_seconds', 120 );
        return $settings;
    }
}
#admin#autosave#editor#gutenberg#performance