wpseek.com
Eine auf WordPress spezialiserte Suchmaschine für Entwickler und Theme-Autoren



wp_maintenance › WordPress Function

Seit3.0.0
Veraltetn/v
wp_maintenance ( Keine Parameter )
Zugriff:
  • private
Definiert in:
Codex:

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).


Quellcode

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
	);
}