Skip to content

Commit

Permalink
Merge pull request #1470 from publishpress/feature/#1469_Critial_Erro…
Browse files Browse the repository at this point in the history
…r_on_the_plugin_settings_page_when_some_features_are_disabled

feature/#1469_Critial_Error_on_the_plugin_settings_page_when_some_features_are_disabled
  • Loading branch information
olatechpro authored Sep 25, 2023
2 parents 4201923 + 9a44929 commit 3ede072
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions modules/settings/settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -446,15 +446,6 @@ public function options_page_controller()

$default_module = PP_Modules_Settings::SETTINGS_SLUG . '-settings';

if ($publishpress->modules && is_object($publishpress->modules) && !empty($publishpress->modules)) {
foreach ($publishpress->modules as $mod_name => $mod_data) {
if (!$mod_data->autoload && $mod_data->options->enabled !== 'off') {
$default_module = 'pp-' . $mod_data->slug . '-settings';
break;
}
}
}

$module_settings_slug = isset($_GET['settings_module']) && !empty($_GET['settings_module']) ? sanitize_text_field($_GET['settings_module']) : $default_module;
$requested_module = $publishpress->get_module_by('settings_slug', $module_settings_slug);
$display_text = '';
Expand Down

0 comments on commit 3ede072

Please sign in to comment.