From 5e9aa8b9fc54c3d2362eb615c25bde2793123a36 Mon Sep 17 00:00:00 2001 From: Giacomo Secchi Date: Mon, 8 Jul 2024 10:18:55 +0200 Subject: [PATCH] Fix maintenance mode activation error --- includes/base/development/class-maintenance-mode.php | 2 +- mu-plugins/project-custom-functions.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/base/development/class-maintenance-mode.php b/includes/base/development/class-maintenance-mode.php index 73af342..e18f549 100644 --- a/includes/base/development/class-maintenance-mode.php +++ b/includes/base/development/class-maintenance-mode.php @@ -35,7 +35,7 @@ public function register() { return; } - add_action( 'wp', array( $this, 'check_excluded_pages' ) ); + add_action( 'init', array( $this, 'check_excluded_pages' ) ); } diff --git a/mu-plugins/project-custom-functions.php b/mu-plugins/project-custom-functions.php index 82579db..56761e1 100644 --- a/mu-plugins/project-custom-functions.php +++ b/mu-plugins/project-custom-functions.php @@ -38,7 +38,7 @@ add_filter( 'pre_option_writepoetry_maintenance_mode', function () { - return 0; + return '1'; } );