Skip to content

Commit

Permalink
Prevent old Planner > Settings > Statuses links from causing error.
Browse files Browse the repository at this point in the history
Statuses are no longer controlled by a module in Planner.  Prevent old links or stale page refreshes from causing needless problems.
  • Loading branch information
agapetry committed Dec 14, 2023
1 parent b3a494e commit f9fca0b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions modules/settings/settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 = '';

Expand Down

0 comments on commit f9fca0b

Please sign in to comment.