Skip to content

Instantly share code, notes, and snippets.

View rinatkhaziev's full-sized avatar
🤖
Cache rules everything around me

Rinat K rinatkhaziev

🤖
Cache rules everything around me
View GitHub Profile
@rinatkhaziev
rinatkhaziev / s-maintenance-mode.php
Created August 18, 2012 01:36 — forked from mjangda/s-maintenance-mode.php
Custom WordPress maintenance mode that allows super admins access to the Dashboard
<?php
add_action( 'init', 'x_maintenance_mode' );
function x_maintenance_mode() {
if ( defined( 'X_MAINTENANCE_MODE' ) && true === X_MAINTENANCE_MODE ) {
if ( is_super_admin() && is_admin() )
return;
die( 'Site is currently under maintenance' );