WordPress.org

Make WordPress Core

Ticket #18826: maintenance.diff

File maintenance.diff, 613 bytes (added by jaredh123, 4 years ago)
  • wp-includes/load.php

     
    151151 
    152152        include( ABSPATH . '.maintenance' ); 
    153153        // If the $upgrading timestamp is older than 10 minutes, don't die. 
    154         if ( ( time() - $upgrading ) >= 600 ) 
     154        if ( ( time() - $upgrading ) >= apply_filters( 'wp_maintenance_expiration', 300 ) ) { 
     155                @unlink( ABSPATH . '.maintenance' ); 
    155156                return; 
     157        } 
    156158 
    157159        if ( file_exists( WP_CONTENT_DIR . '/maintenance.php' ) ) { 
    158160                require_once( WP_CONTENT_DIR . '/maintenance.php' );