// Alert on Staging Site | |
// http://stackoverflow.com/questions/6522023/php-if-domain | |
$host = $_SERVER['HTTP_HOST']; | |
if ($host != 'XXXXXXXXXX.com') { | |
function staging_admin_error_notice() | |
{ | |
$class = "error"; | |
$message = "You are on the staging site."; | |
echo"<div class=\"$class\"> <h1>$message</h1></div>"; | |
} | |
add_action('admin_notices', 'staging_admin_error_notice'); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment