My Private Site - Version 3.0.6

Version Description

  • Moved compatibility mode option to Site Privacy tab and added additional theme compatibility fixes
Download this release

Release Info

Developer dgewirtz
Plugin Icon 128x128 My Private Site
Version 3.0.6
Comparing to
See all releases

Code changes from version 3.0.5 to 3.0.6

admin/advanced.php CHANGED
@@ -92,23 +92,23 @@ function my_private_site_admin_advanced_section_data($section_options) {
92
  my_private_site_preload_cmb2_field_filter('jr_ps_admin_advanced_password_reset_url', $handler_function);
93
  }
94
 
95
- $compatibility_mode = array(
96
- 'STANDARD' => 'Standard',
97
- 'ELEMENTOR' => 'Elementor Fix',
98
- );
99
-
100
- $compatibility_desc = "Adjust this setting if My Private Site doesn't properly block access.";
101
-
102
- $section_options->add_field(array(
103
- 'name' => __('Compatibility Mode'),
104
- 'id' => 'jr_ps_admin_advanced_compatibility_mode',
105
- 'type' => 'select',
106
- 'default' => 'STANDARD',
107
- // the index key of the label array below
108
- 'options' => $compatibility_mode,
109
- 'desc' => $compatibility_desc,
110
- ));
111
- my_private_site_preload_cmb2_field_filter('jr_ps_admin_advanced_compatibility_mode', $handler_function);
112
 
113
  // although this feature was in Jonradio's original code, there's nothing he does with it other than set it
114
  // $section_options->add_field(array(
@@ -294,10 +294,10 @@ function my_private_site_tab_advanced_process_buttons() {
294
  $settings['login_url'] = '';
295
  }
296
 
297
- if (isset($_POST["jr_ps_admin_advanced_compatibility_mode"])) {
298
- $compatibility_mode = trim($_POST['jr_ps_admin_advanced_compatibility_mode']);
299
- $settings['compatibility_mode'] = $compatibility_mode;
300
- }
301
 
302
  if (isset($_POST["jr_ps_admin_advanced_custom_landing"])) {
303
  $settings['override_omit'] = true;
@@ -357,13 +357,13 @@ function my_private_site_admin_advanced_preload($data, $object_id, $args, $field
357
  return false;
358
  }
359
  break;
360
- case 'jr_ps_admin_advanced_compatibility_mode':
361
- if (isset($settings['compatibility_mode'])) {
362
- return $settings['compatibility_mode'];
363
- } else {
364
- return 'STANDARD';
365
- }
366
- break;
367
  case 'jr_ps_admin_advanced_custom_landing':
368
  if (isset($settings['override_omit'])) {
369
  return $settings['override_omit'];
92
  my_private_site_preload_cmb2_field_filter('jr_ps_admin_advanced_password_reset_url', $handler_function);
93
  }
94
 
95
+ // $compatibility_mode = array(
96
+ // 'STANDARD' => 'Standard',
97
+ // 'ELEMENTOR' => 'Elementor Fix',
98
+ // );
99
+ //
100
+ // $compatibility_desc = "Adjust this setting if My Private Site doesn't properly block access.";
101
+ //
102
+ // $section_options->add_field(array(
103
+ // 'name' => __('Compatibility Mode'),
104
+ // 'id' => 'jr_ps_admin_advanced_compatibility_mode',
105
+ // 'type' => 'select',
106
+ // 'default' => 'STANDARD',
107
+ // // the index key of the label array below
108
+ // 'options' => $compatibility_mode,
109
+ // 'desc' => $compatibility_desc,
110
+ // ));
111
+ // my_private_site_preload_cmb2_field_filter('jr_ps_admin_advanced_compatibility_mode', $handler_function);
112
 
113
  // although this feature was in Jonradio's original code, there's nothing he does with it other than set it
114
  // $section_options->add_field(array(
294
  $settings['login_url'] = '';
295
  }
296
 
297
+ // if (isset($_POST["jr_ps_admin_advanced_compatibility_mode"])) {
298
+ // $compatibility_mode = trim($_POST['jr_ps_admin_advanced_compatibility_mode']);
299
+ // $settings['compatibility_mode'] = $compatibility_mode;
300
+ // }
301
 
302
  if (isset($_POST["jr_ps_admin_advanced_custom_landing"])) {
303
  $settings['override_omit'] = true;
357
  return false;
358
  }
359
  break;
360
+ // case 'jr_ps_admin_advanced_compatibility_mode':
361
+ // if (isset($settings['compatibility_mode'])) {
362
+ // return $settings['compatibility_mode'];
363
+ // } else {
364
+ // return 'STANDARD';
365
+ // }
366
+ // break;
367
  case 'jr_ps_admin_advanced_custom_landing':
368
  if (isset($settings['override_omit'])) {
369
  return $settings['override_omit'];
admin/site-privacy.php CHANGED
@@ -82,6 +82,24 @@ function my_private_site_admin_site_privacy_section_data($section_options ) {
82
  ) );
83
  my_private_site_preload_cmb2_field_filter( 'jr_ps_admin_site_privacy_enable', $handler_function );
84
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
85
  my_private_site_display_cmb2_submit_button( $section_options, array(
86
  'button_id' => 'jr_ps_button_site_privacy_save',
87
  'button_text' => 'Save Privacy Status',
@@ -102,7 +120,10 @@ function my_private_site_tab_site_privacy_process_buttons() {
102
  } else {
103
  $settings['private_site'] = false;
104
  }
105
-
 
 
 
106
  $result = update_option( 'jr_ps_settings', $settings );
107
  my_private_site_flag_cmb2_submit_button_success('jr_ps_button_site_privacy_save');
108
  }
@@ -124,5 +145,12 @@ function my_private_site_admin_site_privacy_preload($data, $object_id, $args, $f
124
  return false;
125
  }
126
  break;
 
 
 
 
 
 
 
127
  }
128
  }
82
  ) );
83
  my_private_site_preload_cmb2_field_filter( 'jr_ps_admin_site_privacy_enable', $handler_function );
84
 
85
+ $compatibility_mode = array(
86
+ 'STANDARD' => 'Standard',
87
+ 'ELEMENTOR' => 'Theme Fix',
88
+ );
89
+
90
+ $compatibility_desc = "Adjust this setting if My Private Site doesn't properly block access for your theme.";
91
+
92
+ $section_options->add_field(array(
93
+ 'name' => __('Compatibility Mode'),
94
+ 'id' => 'jr_ps_admin_advanced_compatibility_mode',
95
+ 'type' => 'select',
96
+ 'default' => 'STANDARD',
97
+ // the index key of the label array below
98
+ 'options' => $compatibility_mode,
99
+ 'desc' => $compatibility_desc,
100
+ ));
101
+ my_private_site_preload_cmb2_field_filter('jr_ps_admin_advanced_compatibility_mode', $handler_function);
102
+
103
  my_private_site_display_cmb2_submit_button( $section_options, array(
104
  'button_id' => 'jr_ps_button_site_privacy_save',
105
  'button_text' => 'Save Privacy Status',
120
  } else {
121
  $settings['private_site'] = false;
122
  }
123
+ if (isset($_POST["jr_ps_admin_advanced_compatibility_mode"])) {
124
+ $compatibility_mode = trim($_POST['jr_ps_admin_advanced_compatibility_mode']);
125
+ $settings['compatibility_mode'] = $compatibility_mode;
126
+ }
127
  $result = update_option( 'jr_ps_settings', $settings );
128
  my_private_site_flag_cmb2_submit_button_success('jr_ps_button_site_privacy_save');
129
  }
145
  return false;
146
  }
147
  break;
148
+ case 'jr_ps_admin_advanced_compatibility_mode':
149
+ if (isset($settings['compatibility_mode'])) {
150
+ return $settings['compatibility_mode'];
151
+ } else {
152
+ return 'STANDARD';
153
+ }
154
+ break;
155
  }
156
  }
jonradio-private-site.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: My Private Site
4
  Plugin URI: http://zatzlabs.com/plugins/
5
  Description: Easily secure posts, pages, or your entire WordPress site by requiring visitors to login.
6
- Version: 3.0.5
7
  Author: David Gewirtz
8
  Author URI: http://zatzlabs.com/plugins/
9
  License: GPLv2
3
  Plugin Name: My Private Site
4
  Plugin URI: http://zatzlabs.com/plugins/
5
  Description: Easily secure posts, pages, or your entire WordPress site by requiring visitors to login.
6
+ Version: 3.0.6
7
  Author: David Gewirtz
8
  Author URI: http://zatzlabs.com/plugins/
9
  License: GPLv2
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: dgewirtz
3
  Donate link: http://zatzlabs.com/lab-notes/
4
  Tags: login, visibility, private, security, plugin, pages, page, posts, post
5
  Requires at least: 3.0
6
- Tested up to: 5.8.1
7
- Stable tag: 3.0.5
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -16,6 +16,8 @@ Allows the Administrator to restrict a WordPress-based web site to viewing only
16
 
17
  Login prompts are provided whenever a non-logged in user ("site visitor") attempts to access any URL controlled by WordPress on the web site.
18
 
 
 
19
  = Features and Settings =
20
 
21
  * Supports WordPress Networks ("Multisite"), with Network-wide Settings planned for a future version
@@ -90,6 +92,9 @@ Whenever you change your WordPress Permalinks (Settings-Permalinks in Admin pane
90
 
91
  == Changelog ==
92
 
 
 
 
93
  = 3.0.5 =
94
  * Added a compatibility mode option on the Advanced tab which will hopefully finally fix the Elementor issues
95
 
3
  Donate link: http://zatzlabs.com/lab-notes/
4
  Tags: login, visibility, private, security, plugin, pages, page, posts, post
5
  Requires at least: 3.0
6
+ Tested up to: 5.9
7
+ Stable tag: 3.0.6
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
16
 
17
  Login prompts are provided whenever a non-logged in user ("site visitor") attempts to access any URL controlled by WordPress on the web site.
18
 
19
+ **Note:** If privacy isn't turned on for your theme, use the Compatibility Mode option on the Site Privacy tab. This is known to apply to Elementor, Oxygen, and Twenty Twenty Two themes.
20
+
21
  = Features and Settings =
22
 
23
  * Supports WordPress Networks ("Multisite"), with Network-wide Settings planned for a future version
92
 
93
  == Changelog ==
94
 
95
+ = 3.0.6 =
96
+ * Moved compatibility mode option to Site Privacy tab and added additional theme compatibility fixes
97
+
98
  = 3.0.5 =
99
  * Added a compatibility mode option on the Advanced tab which will hopefully finally fix the Elementor issues
100