我使用此挂钩将网站置于维护模式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\');
现在我无法回到正常模式。
EDIT: 问题是W3 Total Cache插件。