Skip to content

Commit

Permalink
Address issue of form values not being saved
Browse files Browse the repository at this point in the history
  • Loading branch information
leedxw committed Jul 9, 2024
1 parent 95e37c1 commit 2854607
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 3 deletions.
13 changes: 12 additions & 1 deletion settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,18 @@
function dxw_members_only_metasettings()
{
$ms = new dmometasettings(__FILE__, 'dxw_members_only');
$ms->add_settings(__('dxw Members Only', 'dxwmembersonly'), ['list_type', 'list_content', 'ip_whitelist', 'referrer_allow_list', 'redirect', 'redirect_root', 'upload_default', 'max_age'], 'dxw_members_only_options_page');
$ms->add_settings(__('dxw Members Only', 'dxwmembersonly'), [
'list_type',
'list_content',
'ip_whitelist',
'referrer_allow_list',
'redirect',
'redirect_root',
'upload_default',
'max_age',
'max_age_static',
'max_age_public'
], 'dxw_members_only_options_page');
}

/**
Expand Down
8 changes: 6 additions & 2 deletions upgrade.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,16 @@
function transfer_new_members_only_options()
{
$options = [
'list_type',
'list_content',
'ip_whitelist',
'referrer_allow_list',
'redirect',
'redirect_root',
'upload_default',
'max_age',
'ip_whitelist',
'upload_default'
'max_age_static',
'max_age_public'
];
foreach ($options as $option) {
$old_option = 'new_members_only_' . $option;
Expand Down

0 comments on commit 2854607

Please sign in to comment.