From f9fca0be7a3ed0ee3a6d47881fab118b7cfeff3b Mon Sep 17 00:00:00 2001 From: Kevin Behrens <43488774+agapetry@users.noreply.github.com> Date: Wed, 13 Dec 2023 22:26:25 -0500 Subject: [PATCH] Prevent old Planner > Settings > Statuses links from causing error. Statuses are no longer controlled by a module in Planner. Prevent old links or stale page refreshes from causing needless problems. --- modules/settings/settings.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/modules/settings/settings.php b/modules/settings/settings.php index 8be26752..50098271 100644 --- a/modules/settings/settings.php +++ b/modules/settings/settings.php @@ -448,6 +448,12 @@ public function options_page_controller() $default_module = PP_Modules_Settings::SETTINGS_SLUG . '-settings'; $module_settings_slug = isset($_GET['settings_module']) && !empty($_GET['settings_module']) ? sanitize_text_field($_GET['settings_module']) : $default_module; + + // Custom Statuses are no longer defined by a Planner module + if ('pp-custom-status-settings' == $module_settings_slug) { + $module_settings_slug = $default_module; + } + $requested_module = $publishpress->get_module_by('settings_slug', $module_settings_slug); $display_text = '';