kronoszx
5/8/2017 - 10:40 PM

Mantenimiento

Mantenimiento

<html> 
<h1>Estamos realizando tareas de mantenimiento.</h1> 
<h2>Por favor, vuelva a intentarlo más tarde. Disculpe las molestias.</h2> 
</html>
function modo_mantenimiento() {  
    global $pagenow;  
    if ( $pagenow !== 'wp-login.php' && ! current_user_can( 'manage_options' ) && ! is_admin() ) {  
        header( $_SERVER["SERVER_PROTOCOL"] . ' 503 Service Temporarily Unavailable', true, 503 );  
        header( 'Content-Type: text/html; charset=utf-8' );  
         if ( file_exists(ABSPATH . 'mantenimiento.php') ) {  
          require_once(ABSPATH . 'mantenimiento.php');  
        }  
        die();  
    }  
}  
add_action( 'wp_loaded', 'modo_mantenimiento' );