Changeset 3407972
- Timestamp:
- 12/02/2025 12:22:11 PM (3 months ago)
- Location:
- poptin/trunk
- Files:
-
- 2 edited
-
poptin.php (modified) (4 diffs)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
poptin/trunk/poptin.php
r3354690 r3407972 4 4 Contributors: poptin, galdub, tomeraharon 5 5 Description: Use Poptin to get more leads, sales, and email subscribers. Create targeted beautiful pop ups and forms in less than 2 minutes with ease. 6 Version: 1.3. 76 Version: 1.3.8 7 7 Author: Poptin 8 8 Author URI: https://www.poptin.com … … 173 173 if(isset($_GET['page']) && $_GET['page'] == 'Poptin-support') { 174 174 wp_redirect(admin_url("admin.php?page=poptin")); 175 exit; 176 } 177 178 // Handle logout redirect early, before any output is sent 179 if(isset($_GET['page']) && $_GET['page'] == 'poptin-logout') { 180 // Check user permissions 181 if (!current_user_can('manage_options')) { 182 wp_die(__('You do not have sufficient permissions to access this page.', 'ppbase')); 183 } 184 185 // Clear Poptin data 186 update_option('poptin_id', ''); 187 update_option('poptin_marketplace_token', ''); 188 update_option('poptin_marketplace_email_id', ''); 189 update_option('poptin_user_id', ''); 190 poptin_clear_all_caches(); 191 192 // Redirect to Poptin dashboard 193 wp_redirect(admin_url('admin.php?page=poptin')); 175 194 exit; 176 195 } … … 832 851 833 852 public function poptin_logout_view() { 834 // Clear Poptin data (similar to your existing delete_poptin_id method) 853 // This is a fallback - the logout should be handled in admin_init 854 // But if we reach here, clear data and use JavaScript redirect 835 855 update_option('poptin_id', ''); 836 856 update_option('poptin_marketplace_token', ''); … … 839 859 poptin_clear_all_caches(); 840 860 841 // Redirect back to main page 842 wp_redirect(admin_url('admin.php?page=poptin')); 843 exit; 861 // Use JavaScript redirect since headers may already be sent 862 $redirect_url = admin_url('admin.php?page=poptin'); 863 ?> 864 <script type="text/javascript"> 865 window.location.href = "<?php echo esc_js($redirect_url); ?>"; 866 </script> 867 <p><?php esc_html_e('Logging out... If you are not redirected automatically, ', 'ppbase'); ?><a href="<?php echo esc_url($redirect_url); ?>"><?php esc_html_e('click here', 'ppbase'); ?></a>.</p> 868 <?php 844 869 } 845 870 -
poptin/trunk/readme.txt
r3406762 r3407972 4 4 Requires at least: 3.1 5 5 Tested up to: 6.9 6 Stable tag: 1.3. 76 Stable tag: 1.3.8 7 7 Plugin URI: https://www.poptin.com 8 8 License: GPLv3 … … 243 243 == Changelog == 244 244 245 = 1.3.8 = 246 Logout bug fixed 247 245 248 = 1.3.7 = 246 249 WordPress Playground bug fixed
Note: See TracChangeset
for help on using the changeset viewer.