diff --git a/README.md b/README.md index 3a24151..055c674 100644 --- a/README.md +++ b/README.md @@ -99,6 +99,9 @@ There are 2 filters available here: - `TENUPSSO_DISABLE` - Define this as `true` to force disable SSO. - `TENUPSSO_DISALLOW_ALL_DIRECT_LOGIN` - Define this as `true` to disable username/password log ins completely. +- `SUPPORT_MONITOR_ENABLE` - Overrides the settings to enable Support Monitor. Possible values `yes` and `no`. +- `SUPPORT_MONITOR_API_KEY` - Overrides the settings to Support Monitor API key. +- `SUPPORT_MONITOR_SERVER_URL` - Overrides the settings to Support Monitor server url. ### Activity Log diff --git a/includes/classes/SupportMonitor/Monitor.php b/includes/classes/SupportMonitor/Monitor.php index 60c380b..398e847 100644 --- a/includes/classes/SupportMonitor/Monitor.php +++ b/includes/classes/SupportMonitor/Monitor.php @@ -26,9 +26,11 @@ class Monitor { public function setup() { if ( TENUP_EXPERIENCE_IS_NETWORK ) { + add_filter( 'site_option_tenup_support_monitor_settings', [ $this, 'handle_settings' ] ); add_action( 'wpmu_options', [ $this, 'ms_settings' ] ); add_action( 'admin_init', [ $this, 'ms_save_settings' ] ); } else { + add_filter( 'option_tenup_support_monitor_settings', [ $this, 'handle_settings' ] ); add_action( 'admin_init', [ $this, 'register_settings' ] ); } @@ -89,7 +91,6 @@ public function ms_save_settings() { * @since 1.7 */ public function ms_settings() { - $setting = $this->get_setting(); ?>
@@ -100,21 +101,20 @@ public function ms_settings() {