I put my site in maintenance mode using this hook in functions.php
,
function activate_maintenance_mode() {
//If the current user is NOT an 'Administrator' or NOT 'Super Admin' then display Maintenance Page.
if ( !(current_user_can( 'administrator' ) || current_user_can( 'super admin' ))) {
//Kill WordPress execution and display HTML maintenance message.
wp_die('<h1>Sitio en mantenimiento</h1><p>Nuestro sitio esta actualemente en mantenimiento.
<br /><strong>Ya volvemos!</strong></p>', 'mantenimiento');
}
}
//Hooks the 'activate_maintenance_mode' function on to the 'get_header' action.
add_action('get_header', 'activate_maintenance_mode');
and now I can't return back to normal mode.
EDIT: The problem had to be with W3 Total Cache plugin.
current_user_can( 'super admin' )
part with the space will work. You can try with any super admin caps likecurrent_user_can( 'manage_network' )