Make WordPress Core

Ticket #37347: 37347.diff

File 37347.diff, 1.0 KB (added by Zuige, 8 years ago)
  • wp-admin/includes/class-wp-upgrader.php

    diff --git a/wp-admin/includes/class-wp-upgrader.php b/wp-admin/includes/class-wp-upgrader.php
    index 6995983..fb5d977 100644
    a b class WP_Upgrader { 
    808808       public function maintenance_mode( $enable = false ) {
    809809               global $wp_filesystem;
    810810               $file = $wp_filesystem->abspath() . '.maintenance';
     811               /**
     812                * Filters whether to enable maintenance mode
     813                *
     814                * @since 4.6
     815                * @access public
     816                *
     817                * @param bool        $enable  Whether to apply maintenance mode
     818                * @param WP_Upgrader $this    The WP_Upgrader instance.
     819                */
     820               $enable = apply_filters( 'maintenance_mode', $enable, $this );
    811821               if ( $enable ) {
    812822                       $this->skin->feedback('maintenance_start');
    813823                       // Create maintenance file to signal that we are upgrading