Changeset 3445584
- Timestamp:
- 01/23/2026 12:50:34 PM (2 months ago)
- Location:
- zero-spam/trunk
- Files:
-
- 3 edited
-
core/admin/class-admin.php (modified) (2 diffs)
-
readme.txt (modified) (2 diffs)
-
wordpress-zero-spam.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
zero-spam/trunk/core/admin/class-admin.php
r3443488 r3445584 118 118 */ 119 119 public function admin_notices() { 120 error_log( '========== ZERO SPAM ADMIN_NOTICES START ==========' );121 122 120 // Clean up old transients from previous implementation (temporary cleanup code). 123 121 $current_user_id = get_current_user_id(); … … 125 123 error_log( 'Cleaned up old transient: zerospam_promo_shown_' . $current_user_id ); 126 124 } 127 128 // Only display notices for administrators. 129 if ( ! current_user_can( 'administrator' ) ) { 130 error_log( 'EXITING: User is not administrator' ); 131 error_log( '========== ZERO SPAM ADMIN_NOTICES END ==========' ); 132 return; 133 } 134 135 error_log( 'User IS administrator, continuing...' ); 136 137 // Get the Enhanced Protection settings directly from the options. 138 $zerospam_settings = get_option( 'zero-spam-zerospam', array() ); 139 error_log( 'Settings from DB: ' . print_r( $zerospam_settings, true ) ); 140 141 $zerospam_enabled = ! empty( $zerospam_settings['zerospam'] ) && 'enabled' === $zerospam_settings['zerospam']; 142 error_log( 'Enhanced Protection Enabled: ' . ( $zerospam_enabled ? 'YES' : 'NO' ) ); 143 144 $zerospam_license_key = ! empty( $zerospam_settings['zerospam_license'] ) ? $zerospam_settings['zerospam_license'] : false; 145 error_log( 'License Key Present: ' . ( $zerospam_license_key ? 'YES' : 'NO' ) ); 125 126 // Get the Enhanced Protection settings using the Settings API for consistency. 127 $settings = \ZeroSpam\Core\Settings::get_settings(); 128 129 // Check if Enhanced Protection is enabled. 130 $zerospam_enabled = isset( $settings['zerospam']['value'] ) && 'enabled' === $settings['zerospam']['value']; 131 132 // Check for license key - include constant check like the settings definition does. 133 $zerospam_license_key = false; 134 if ( defined( 'ZEROSPAM_LICENSE_KEY' ) && ZEROSPAM_LICENSE_KEY ) { 135 $zerospam_license_key = ZEROSPAM_LICENSE_KEY; 136 } elseif ( ! empty( $settings['zerospam_license']['value'] ) ) { 137 $zerospam_license_key = $settings['zerospam_license']['value']; 138 } 146 139 147 140 // Display enhanced promo notice or error notice based on state. 148 141 if ( $zerospam_enabled && ! $zerospam_license_key ) { 149 error_log( 'BRANCH 1: Enhanced ON + No License = show ERROR notice' );150 142 // Enhanced Protection enabled but no license key - show error. 151 143 $this->display_license_error_notice(); 152 144 } elseif ( ! $zerospam_enabled && ! $zerospam_license_key ) { 153 error_log( 'BRANCH 2: Enhanced OFF + No License = show PROMO notice' );154 145 // Enhanced Protection disabled and no license - show promo notice. 155 146 $this->display_promo_notice(); 156 } else {157 error_log( 'BRANCH 3: No notice needed (has license or other condition)' );158 147 } 159 148 160 149 // Check if the plugin has been auto-configured. 161 150 $configured = get_option( 'zerospam_configured' ); 162 error_log( 'Plugin configured: ' . ( $configured ? 'YES' : 'NO' ) );163 error_log( '========== ZERO SPAM ADMIN_NOTICES END ==========' );164 151 165 152 if ( ! $configured ) { -
zero-spam/trunk/readme.txt
r3443721 r3445584 6 6 Tested up to: 6.9 7 7 Requires PHP: 8.2 8 Stable tag: 5.6. 18 Stable tag: 5.6.2 9 9 License: GPL v2 or later 10 10 License URI: http://www.gnu.org/licenses/gpl-2.0.txt … … 107 107 108 108 == Changelog == 109 110 = v5.6.2 = 111 112 * fix(admin): resolved issue where "Advanced Protection is enabled but not licensed" notice displayed incorrectly when Enhanced Protection was disabled 113 * fix(admin): corrected Settings API usage in admin notices for consistency with dashboard widget 114 * fix(admin): added support for ZEROSPAM_LICENSE_KEY constant check in admin notice logic 115 * fix(debug): removed testing debug statements 109 116 110 117 = v5.6.1 = -
zero-spam/trunk/wordpress-zero-spam.php
r3443721 r3445584 16 16 * Plugin URI: https://wordpress.com/plugins/zero-spam/ 17 17 * Description: Tired of all the ineffective WordPress anti-spam & security plugins? Zero Spam for WordPress makes blocking spam & malicious activity a cinch. <strong>Just activate, configure, and say goodbye to spam.</strong> 18 * Version: 5.6. 118 * Version: 5.6.2 19 19 * Requires at least: 6.9 20 20 * Requires PHP: 8.2 … … 34 34 define( 'ZEROSPAM_PATH', plugin_dir_path( ZEROSPAM ) ); 35 35 define( 'ZEROSPAM_PLUGIN_BASE', plugin_basename( ZEROSPAM ) ); 36 define( 'ZEROSPAM_VERSION', '5.6. 1' );36 define( 'ZEROSPAM_VERSION', '5.6.2' ); 37 37 38 38 if ( defined( 'ZEROSPAM_DEVELOPMENT_URL' ) ) {
Note: See TracChangeset
for help on using the changeset viewer.