updated menu structure
This commit is contained in:
@ -7,7 +7,8 @@ class SettingsPage
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
add_options_page(BDP_LV_PLUGIN_SLUG . '-kompass',
|
||||
add_options_page(
|
||||
__('kompass', BDP_LV_PLUGIN_SLUG) . ' - ' . __('Settings', BDP_LV_PLUGIN_SLUG),
|
||||
__('kompass', BDP_LV_PLUGIN_SLUG) . ' - ' . __('Settings', BDP_LV_PLUGIN_SLUG),
|
||||
'manage_options',
|
||||
BDP_LV_PLUGIN_SLUG . '-Kompass-settings',
|
||||
@ -22,6 +23,9 @@ class SettingsPage
|
||||
if (isset($_REQUEST['update_options']) && $_REQUEST['update_options'] == true) {
|
||||
switch ($tab) {
|
||||
case 'tab1':
|
||||
update_option('bdp_calendar_categories', json_encode($_POST['category']));
|
||||
update_option('bdp_calendar_source_url', $_POST['ical_url']);
|
||||
$showMessage = __('The settings were saved.', BDP_LV_PLUGIN_SLUG);
|
||||
break;
|
||||
|
||||
case 'tab2':
|
||||
@ -53,9 +57,10 @@ class SettingsPage
|
||||
switch ($tab) {
|
||||
case 'tab1':
|
||||
echo '<form action="admin.php?page=bdp-kompass-Kompass-settings&tab=tab1" method="post">';
|
||||
do_settings_sections(BDP_LV_PLUGIN_SLUG . '-seo-settings');
|
||||
submit_button();
|
||||
echo '<input type="hidden" name="tab" value="tab4" />';
|
||||
do_settings_sections(BDP_LV_PLUGIN_SLUG . '-calendar-settings');
|
||||
require_once BDP_LV_PLUGIN_DIR . '/modules/calendar/Views/categories-partial.php';
|
||||
echo '<input type="hidden" name="tab" value="tab1" />';
|
||||
submit_button();
|
||||
echo '</form>';
|
||||
break;
|
||||
case 'tab2':
|
||||
|
Reference in New Issue
Block a user