Changeset 37690 for trunk/src/wp-includes/load.php
- Timestamp:
- 06/12/2016 02:42:02 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/load.php
r37677 r37690 184 184 if ( ( time() - $upgrading ) >= 600 ) 185 185 return; 186 186 187 187 /** 188 * Bypass the maintenance mode check188 * Filters whether to enable maintenance mode. 189 189 * 190 * This filter should *NOT* be used by plugins. It is designed for non-web 191 * runtimes. If this filter returns true, maintenance mode will not be 192 * active which can cause problems during updates for web site views. 190 * This filter runs before it can be used by plugins. It is designed for 191 * non-web runtimes. If this filter returns true, maintenance mode will be 192 * active and the request will end. If false, the request will be allowed to 193 * continue processing even if maintenance mode should be active. 193 194 * 194 195 * @since 4.6.0 195 196 * 196 * @param bool True to bypass maintenance 197 * @param bool $enable_checks Whether to enable maintenance mode. Default true. 198 * @param int $upgrading The timestamp set in the .maintenance file. 197 199 */ 198 if ( apply_filters( 'bypass_maintenance_mode', false ) ){199 return; 200 if ( ! apply_filters( 'enable_maintenance_mode', true, $upgrading ) ) { 201 return; 200 202 } 201 203 … … 302 304 function wp_debug_mode() { 303 305 /** 304 * Bypass the debug mode check306 * Filters whether to allow the debug mode check to occur. 305 307 * 306 * This filter should *NOT* be used by plugins. It is designed for non-web307 * runtimes. Returning true causes the WP_DEBUG and related constants to308 * not be checked and the default php values for errors will be used unless309 * you take care to update them yourself.308 * This filter runs before it can be used by plugins. It is designed for 309 * non-web run-times. Returning false causes the `WP_DEBUG` and related 310 * constants to not be checked and the default php values for errors 311 * will be used unless you take care to update them yourself. 310 312 * 311 313 * @since 4.6.0 312 314 * 313 * @param bool True to bypass debug mode315 * @param bool $enable_debug_mode Whether to enable debug mode checks to occur. Default true. 314 316 */ 315 if ( apply_filters( 'bypass_debug_mode', false ) ){316 return; 317 if ( ! apply_filters( 'enable_wp_debug_mode_checks', true ) ){ 318 return; 317 319 } 318 320
Note: See TracChangeset
for help on using the changeset viewer.