Make WordPress Core


Ignore:
Timestamp:
03/06/2008 06:07:53 AM (19 years ago)
Author:
ryan
Message:

Use constant instead of DB option for setting autosave_interval. Props mdawaffe. fixes #6075

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/post.php

    r7162 r7165  
    1919                $now = time();
    2020                $then = strtotime($post->post_date_gmt . ' +0000');
    21                 $delta = get_option( 'autosave_interval' ) / 2;
     21                $delta = AUTOSAVE_INTERVAL / 2;
    2222                if ( ($now - $then) < $delta )
    2323                        return $post_ID;
    … …  
    655655        $last = get_post_meta( $post->ID, '_edit_last', true );
    656656
    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 );
    658658
    659659        if ( $lock && $lock > time() - $time_window && $last != $current_user->ID )
Note: See TracChangeset for help on using the changeset viewer.