Changeset 7165
- Timestamp:
- 03/06/2008 06:07:53 AM (17 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/admin.php
r6754 r7165 1 1 <?php 2 3 if ( !defined( 'AUTOSAVE_INTERVAL' ) ) 4 define( 'AUTOSAVE_INTERVAL', 60 ); 2 5 3 6 require_once(ABSPATH . 'wp-admin/includes/bookmark.php'); -
trunk/wp-admin/includes/post.php
r7162 r7165 19 19 $now = time(); 20 20 $then = strtotime($post->post_date_gmt . ' +0000'); 21 $delta = get_option( 'autosave_interval' )/ 2;21 $delta = AUTOSAVE_INTERVAL / 2; 22 22 if ( ($now - $then) < $delta ) 23 23 return $post_ID; … … 655 655 $last = get_post_meta( $post->ID, '_edit_last', true ); 656 656 657 $time_window = apply_filters( 'wp_check_post_lock_window', get_option( 'autosave_interval' )* 2 );657 $time_window = apply_filters( 'wp_check_post_lock_window', AUTOSAVE_INTERVAL * 2 ); 658 658 659 659 if ( $lock && $lock > time() - $time_window && $last != $current_user->ID ) -
trunk/wp-admin/includes/schema.php
r7154 r7165 250 250 add_option('medium_size_w', 300); 251 251 add_option('medium_size_h', 300); 252 add_option('autosave_interval', 60);253 252 254 253 // Delete unused options 255 $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' );254 $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', 'autosave_interval'); 256 255 foreach ($unusedoptions as $option) : 257 256 delete_option($option); -
trunk/wp-includes/script-loader.php
r7160 r7165 49 49 50 50 $this->add( 'autosave', '/wp-includes/js/autosave.js', array('schedule', 'wp-ajax-response'), '20080221' . mt_rand()); 51 if ( ! $autosave_interval = get_option( 'autosave_interval' ) )52 $autosave_interval = 60;53 $this->localize( 'autosave', 'autosaveL10n', array(54 'autosaveInterval' => $autosave_interval,55 'previewPageText' => __('View this Page'),56 'previewPostText' => __('View this Post'),57 'requestFile' => get_option( 'siteurl' ) . '/wp-admin/admin-ajax.php',58 'savingText' => __('Saving Draft…')59 ) );60 51 61 52 $this->add( 'wp-ajax', '/wp-includes/js/wp-ajax.js', array('prototype'), '20070306'); … … 488 479 function wp_just_in_time_script_localization() { 489 480 wp_localize_script( 'tiny_mce', 'wpTinyMCEConfig', array( 'defaultEditor' => wp_default_editor() ) ); 481 wp_localize_script( 'autosave', 'autosaveL10n', array( 482 'autosaveInterval' => AUTOSAVE_INTERVAL, 483 'previewPageText' => __('View this Page'), 484 'previewPostText' => __('View this Post'), 485 'requestFile' => get_option( 'siteurl' ) . '/wp-admin/admin-ajax.php', 486 'savingText' => __('Saving Draft…') 487 ) ); 490 488 } 491 489
Note: See TracChangeset
for help on using the changeset viewer.