Created
June 21, 2016 12:11
-
-
Save anonymous/888f6e5f8f4ed793204a60138abd2fe2 to your computer and use it in GitHub Desktop.
Beeinflusse den Original-Maintenance Mode von WordPress
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 | |
// Aktiviere den WordPress Maintenance Mode | |
function wp_maintenance_mode(){ | |
if(!current_user_can('edit_themes') || !is_user_logged_in()){ | |
wp_die('<h1 style="color:red">Website im Wartungsmodus</h1><br />Wir müssen mal kurz an der Website schrauben. Bitte habe etwas Geduld, wir sind so schnell wie möglich wieder online.'); | |
} | |
} | |
add_action('get_header', 'wp_maintenance_mode'); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment