Changeset 3370056
- Timestamp:
- 09/30/2025 01:33:57 AM (6 months ago)
- Location:
- simple-membership-custom-messages/trunk
- Files:
-
- 4 edited
-
classes/class.swpm-custom-message-settings.php (modified) (4 diffs)
-
classes/class.swpm-custom-message.php (modified) (2 diffs)
-
readme.txt (modified) (2 diffs)
-
swpm-custom-message.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
simple-membership-custom-messages/trunk/classes/class.swpm-custom-message-settings.php
r3215941 r3370056 28 28 register_setting('swpm-custom-message-tab-1', 'swpm-custom-message-settings', array(&$this, 'sanitize_tab_1')); 29 29 30 add_settings_section('swpm-documentation', __('Plugin Documentation','simple-membership'), array(&$this, 'swpm_documentation_callback'), 'swpm-custom-message-settings');30 add_settings_section('swpm-documentation', __('Plugin fsdafsaDocumentation','simple-membership'), array(&$this, 'swpm_documentation_callback'), 'swpm-custom-message-settings'); 31 31 32 32 add_settings_section('pages-settings', __('Custom Message Settings','simple-membership'), array(&$this, 'swpm_cm_general_settings_callback'), 'swpm-custom-message-settings'); … … 108 108 )); 109 109 110 /** 111 * Partial Protection Addon related settings 112 */ 113 add_settings_section('partial-protection-settings', __('Partial Protection Addon Related','simple-membership'), array(&$this, 'swpm_partial_protection_settings_callback'), 'swpm-custom-message-settings'); 114 115 add_settings_field( 116 'swpm_pp_output_when_not_logged_in', 117 __('Partially Protected - Not Logged In', 'simple-membership'), 118 array(&$this, 'textfield_long_callback'), 119 'swpm-custom-message-settings', 120 'partial-protection-settings', 121 array( 122 'item' => 'swpm_pp_output_when_not_logged_in', 123 'message' => "Shown when a visitor isn't logged in." 124 )); 125 126 add_settings_field( 127 'swpm_pp_output_when_no_access', 128 __('Partially Protected - Member No Access', 'simple-membership'), 129 array(&$this, 'textfield_long_callback'), 130 'swpm-custom-message-settings', 131 'partial-protection-settings', 132 array( 133 'item' => 'swpm_pp_output_when_no_access', 134 'message' => "Shown when a logged-in member doesn't have access at all." 135 )); 136 137 add_settings_field( 138 'swpm_pp_output_when_membership_level_restricted', 139 __('Partially Protected - Membership Level Restricted', 'simple-membership'), 140 array(&$this, 'textfield_long_callback'), 141 'swpm-custom-message-settings', 142 'partial-protection-settings', 143 array( 144 'item' => 'swpm_pp_output_when_membership_level_restricted', 145 'message' => "Shown when their current level doesn't allow access." 146 )); 147 148 add_settings_field( 149 'swpm_pp_output_when_account_status_restricted', 150 __('Partially Protected - Account Status Restricted', 'simple-membership'), 151 array(&$this, 'textfield_long_callback'), 152 'swpm-custom-message-settings', 153 'partial-protection-settings', 154 array( 155 'item' => 'swpm_pp_output_when_account_status_restricted', 156 'message' => "Shown when account status, e.g. inactive/expired, blocks access" 157 )); 158 159 110 160 if ( defined( 'SWPM_FPP_PROTECTION_VER' ) ) { 111 161 //Full Page Protection addon is enabled. Let's check if its version is >=1.2 … … 185 235 public function swpm_cm_general_settings_callback() { 186 236 echo '<p>Core plugin message will only be overwritten if you specify a value in any of the following fields.<p>'; 237 } 238 239 public function swpm_partial_protection_settings_callback() { 240 echo '<p>Partial Protection Addon message will only be overwritten if you specify a value in any of the following fields.<p>'; 187 241 } 188 242 … … 211 265 $output['swpm_mini_login_output_when_logged_in'] = isset($input['swpm_mini_login_output_when_logged_in']) ? ($input['swpm_mini_login_output_when_logged_in']) : ''; 212 266 $output['swpm_mini_login_output_when_not_logged_in'] = isset($input['swpm_mini_login_output_when_not_logged_in']) ? ($input['swpm_mini_login_output_when_not_logged_in']) : ''; 267 268 /** 269 * Partial Protection Addon related settings 270 */ 271 $output['swpm_pp_output_when_not_logged_in'] = isset($input['swpm_pp_output_when_not_logged_in']) ? ($input['swpm_pp_output_when_not_logged_in']) : ''; 272 $output['swpm_pp_output_when_no_access'] = isset($input['swpm_pp_output_when_no_access']) ? ($input['swpm_pp_output_when_no_access']) : ''; 273 $output['swpm_pp_output_when_membership_level_restricted'] = isset($input['swpm_pp_output_when_membership_level_restricted']) ? ($input['swpm_pp_output_when_membership_level_restricted']) : ''; 274 $output['swpm_pp_output_when_account_status_restricted'] = isset($input['swpm_pp_output_when_account_status_restricted']) ? ($input['swpm_pp_output_when_account_status_restricted']) : ''; 213 275 214 276 return $output; -
simple-membership-custom-messages/trunk/classes/class.swpm-custom-message.php
r3125689 r3370056 36 36 add_filter('swpm_mini_login_output_when_not_logged_in',array(&$this,'swpm_mini_login_output_when_not_logged_in')); 37 37 38 // Partial Protection Addon 39 add_filter('swpm_pp_output_when_not_logged_in', array(&$this, 'swpm_pp_output_when_not_logged_in')); 40 add_filter('swpm_pp_output_when_no_access', array(&$this, 'swpm_pp_output_when_no_access')); 41 add_filter('swpm_pp_output_when_membership_level_restricted', array(&$this, 'swpm_pp_output_when_membership_level_restricted')); 42 add_filter('swpm_pp_output_when_account_status_restricted', array(&$this, 'swpm_pp_output_when_account_status_restricted')); 38 43 } 39 44 … … 117 122 return $this->dispatch_message('swpm_mini_login_output_when_not_logged_in', $output); 118 123 } 124 125 public function swpm_pp_output_when_not_logged_in($output) { 126 return $this->dispatch_message('swpm_pp_output_when_not_logged_in', $output); 127 } 128 129 public function swpm_pp_output_when_no_access($output) { 130 return $this->dispatch_message('swpm_pp_output_when_no_access', $output); 131 } 132 133 public function swpm_pp_output_when_membership_level_restricted($output) { 134 return $this->dispatch_message('swpm_pp_output_when_membership_level_restricted', $output); 135 } 136 137 public function swpm_pp_output_when_account_status_restricted($output) { 138 return $this->dispatch_message('swpm_pp_output_when_account_status_restricted', $output); 139 } 119 140 120 141 private function dispatch_message($key, $default) { -
simple-membership-custom-messages/trunk/readme.txt
r3271707 r3370056 3 3 Donate link: https://simple-membership-plugin.com/ 4 4 Tags: users, membership, custom, message, protection-message, 5 Requires at least: 5.05 Requires at least: 6.0 6 6 Tested up to: 6.8 7 Stable tag: 2. 57 Stable tag: 2.6 8 8 License: GPLv2 or later 9 9 … … 34 34 35 35 == Changelog == 36 37 = 2.6 = 38 - Added new settings to allow customization of some of the partial protection addon's output. 36 39 37 40 = 2.5 = -
simple-membership-custom-messages/trunk/swpm-custom-message.php
r3215941 r3370056 6 6 Author: wp.insider 7 7 Author URI: https://simple-membership-plugin.com/ 8 Version: 2. 58 Version: 2.6 9 9 */ 10 10 11 11 //Slug - swpm_cm_ 12 12 13 define('SWPM_CUSTOM_MSG_VERSION', '2. 5' );13 define('SWPM_CUSTOM_MSG_VERSION', '2.6' ); 14 14 define('SWPM_CUSTOM_MSG_PATH', dirname(__FILE__) . '/'); 15 15 define('SWPM_CUSTOM_MSG_URL', plugins_url('',__FILE__));
Note: See TracChangeset
for help on using the changeset viewer.