Created
January 17, 2017 13:27
-
-
Save JeppeSigaard/43f0e9f4540a9fce2e6c349173b5296e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php /* plugin name: Maintenance */ | |
add_action('init', function(){ if( $GLOBALS['pagenow'] !== 'wp-login.php' && !is_user_logged_in() ) { ?> | |
<!DOCTYPE html> | |
<html <?php language_attributes(); ?>> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Maintenance title</title> | |
<?php wp_head(); ?> | |
</head> | |
<body <?php body_class(); ?>> | |
<!-- Create maintenance content here --> | |
</body> | |
<?php wp_footer(); ?> | |
</html> | |
<?php exit; } }); ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment