diff --git a/wp-admin/includes/schema.php b/wp-admin/includes/schema.php index 58d649e54a..e8928cbf7a 100644 --- a/wp-admin/includes/schema.php +++ b/wp-admin/includes/schema.php @@ -249,6 +249,7 @@ function populate_options() { add_option('thumbnail_crop', 1); add_option('medium_size_w', ''); add_option('medium_size_h', ''); + add_option('autosave_interval', 60); // Delete unused options $unusedoptions = array ('blodotgsping_url', 'bodyterminator', 'emailtestonly', 'phoneemail_separator', 'smilies_directory', 'subjectprefix', 'use_bbcode', 'use_blodotgsping', 'use_phoneemail', 'use_quicktags', 'use_weblogsping', 'weblogs_cache_file', 'use_preview', 'use_htmltrans', 'smilies_directory', 'fileupload_allowedusers', 'use_phoneemail', 'default_post_status', 'default_post_category', 'archive_mode', 'time_difference', 'links_minadminlevel', 'links_use_adminlevels', 'links_rating_type', 'links_rating_char', 'links_rating_ignore_zero', 'links_rating_single_image', 'links_rating_image0', 'links_rating_image1', 'links_rating_image2', 'links_rating_image3', 'links_rating_image4', 'links_rating_image5', 'links_rating_image6', 'links_rating_image7', 'links_rating_image8', 'links_rating_image9', 'weblogs_cacheminutes', 'comment_allowed_tags', 'search_engine_friendly_urls', 'default_geourl_lat', 'default_geourl_lon', 'use_default_geourl', 'weblogs_xml_url', 'new_users_can_blog', '_wpnonce', '_wp_http_referer', 'Update', 'action', 'rich_editing'); diff --git a/wp-admin/includes/upgrade.php b/wp-admin/includes/upgrade.php index d9668c5b31..a0389f6d73 100644 --- a/wp-admin/includes/upgrade.php +++ b/wp-admin/includes/upgrade.php @@ -725,8 +725,6 @@ function upgrade_250() { if ( $wp_current_db_version < 6689 ) { populate_roles_250(); } - - add_option('autosave_interval', 60); } // The functions we use to actually do stuff diff --git a/wp-includes/script-loader.php b/wp-includes/script-loader.php index 91c5017592..1d7040d908 100644 --- a/wp-includes/script-loader.php +++ b/wp-includes/script-loader.php @@ -48,8 +48,10 @@ class WP_Scripts { ) ); $this->add( 'autosave', '/wp-includes/js/autosave.js', array('schedule', 'wp-ajax-response'), '20080221' . mt_rand()); + if ( ! $autosave_interval = get_option( 'autosave_interval' ) ) + $autosave_interval = 60; $this->localize( 'autosave', 'autosaveL10n', array( - 'autosaveInterval' => get_option( 'autosave_interval' ), + 'autosaveInterval' => $autosave_interval, 'previewPageText' => __('View this Page'), 'previewPostText' => __('View this Post'), 'requestFile' => get_option( 'siteurl' ) . '/wp-admin/admin-ajax.php',