функция
since 3.0.0
wp_maintenance()
Проверено на WordPress 6.9, обновлено Источник: WordPress Developer Resources.
Сигнатура
wp_maintenance()
Описание
Сообщение по умолчанию можно заменить с помощью drop-in (maintenance.php в каталоге wp-content).
Оригинал (английский)
The default message can be replaced by using a drop-in (maintenance.php in the wp-content directory).
Исходный код
wp-includes/load.php:400
function wp_maintenance() {
// Return if maintenance mode is disabled.
if ( ! wp_is_maintenance_mode() ) {
return;
}
if ( file_exists( WP_CONTENT_DIR . '/maintenance.php' ) ) {
require_once WP_CONTENT_DIR . '/maintenance.php';
die();
}
require_once ABSPATH . WPINC . '/functions.php';
wp_load_translations_early();
header( 'Retry-After: 600' );
wp_die(
__( 'Briefly unavailable for scheduled maintenance. Check back in a minute.' ),
__( 'Maintenance' ),
503
);
}
История изменений
| Версия | Описание |
|---|---|
| 3.0.0 | Introduced. |

