wpseek.com
Un motore di ricerca WordPress per sviluppatori e autori di temi
wp_maintenance is private and should not be used in themes or plugins directly.
wp_maintenance › WordPress Function
Da3.0.0
Deprecaton/a
› wp_maintenance ( Nessun parametro )
| Accedi: |
|
| Definito a: |
|
| Codex: | |
| ChangeLog: |
|
Dies with a maintenance message when conditions are met.
The default message can be replaced by using a drop-in (maintenance.php in the wp-content directory).Funzioni correlate: wp_is_maintenance_mode, maintenance_nag, wp_create_nonce, wp_explain_nonce, wp_basename
Sorgenti
function wp_maintenance() {
// Return if maintenance mode is disabled.
if ( ! wp_is_maintenance_mode() ) {
return;
}
require_once ABSPATH . WPINC . '/functions.php';
if ( file_exists( WP_CONTENT_DIR . '/maintenance.php' ) ) {
status_header( 503 );
nocache_headers();
header( 'Retry-After: 600' );
require_once WP_CONTENT_DIR . '/maintenance.php';
die();
}
wp_load_translations_early();
header( 'Retry-After: 600' );
wp_die(
__( 'Briefly unavailable for scheduled maintenance. Check back in a minute.' ),
__( 'Maintenance' ),
503
);
}