Changeset 3220122
- Timestamp:
- 01/10/2025 10:56:58 AM (14 months ago)
- Location:
- accessibe/trunk
- Files:
-
- 4 edited
-
accessibe.php (modified) (1 diff)
-
accessibe_inc/js/accessibe.js (modified) (1 diff)
-
class.accessibeforwp.php (modified) (7 diffs)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
accessibe/trunk/accessibe.php
r3219469 r3220122 4 4 * Plugin URI: https://accessibe.com/ 5 5 * Description: accessiBe is the #1 fully automated web accessibility solution. Protect your website from lawsuits and increase your potential audience. 6 * Version: 2. 16 * Version: 2.2 7 7 * Author: accessiBe 8 8 * Author URI: https://accessibe.com/ -
accessibe/trunk/accessibe_inc/js/accessibe.js
r3219439 r3220122 132 132 break; 133 133 case 'logout': 134 console.log('reloading: logout');135 134 await API.logOut(); 136 135 // await API.syncMerchantDetails(); -
accessibe/trunk/class.accessibeforwp.php
r3219439 r3220122 149 149 public static function accessibe_render_js_in_footer() { 150 150 $accessibe_options = self::accessibe_get_options(); 151 $current_domain = wp_parse_url(site_url())['host'];151 $current_domain = self::removeWWW(wp_parse_url(site_url())['host']); 152 152 // $current_domain = '9cc3-2405-201-5c0f-d070-14fd-b303-b02-1999.ngrok-free.app'; 153 153 … … 227 227 'email' => $current_user->user_email, 228 228 'fullName' => $current_user->display_name, 229 'storeId' => wp_parse_url(site_url())['host'],229 'storeId' => self::removeWWW(wp_parse_url(site_url())['host']), 230 230 // 'storeId' => '9cc3-2405-201-5c0f-d070-14fd-b303-b02-1999.ngrok-free.app' 231 231 ); … … 247 247 $existing_domains = json_decode(stripslashes($_POST['existingDomains'])); 248 248 249 $current_domain = wp_parse_url(site_url())['host'];249 $current_domain = self::removeWWW(wp_parse_url(site_url())['host']); 250 250 // $current_domain = '9cc3-2405-201-5c0f-d070-14fd-b303-b02-1999.ngrok-free.app'; 251 251 … … 449 449 } // accessibe_admin_footer_text 450 450 451 public static function removeWWW($domain) { 452 // Use regex to replace "www." only at the beginning 453 return preg_replace("/^www\./", "", $domain); 454 } // removeWWW 455 451 456 452 457 /** … … 599 604 <iframe id='accessibe-universal-iframe' src='https://universal.accessibe.com'></iframe> 600 605 </div> 606 <?php 607 if (!isset($accessibe_options['isLoggedOutOnce'])) { 608 echo "<script> 609 window.addEventListener('message', (event) => { 610 if(event.data.eventName == 'iframe-ready') { 611 const iframeRef = document.getElementById('accessibe-universal-iframe'); 612 iframeRef?.contentWindow.postMessage( 613 { eventName: 'request-logout', data: {} }, 614 '*', 615 ); 616 setTimeout(()=> { 617 window.location.reload(); 618 }, 1000); 619 }}); 620 </script>"; 621 $accessibe_options['isLoggedOutOnce'] = true; 622 623 update_option(ACCESSIBE_WP_OPTIONS_KEY, json_encode($accessibe_options)); 624 } 625 ?> 601 626 <!-- /.wrap --> 602 627 <?php … … 657 682 $current_user = wp_get_current_user(); 658 683 $mixpanelHandler = new MixpanelHandler(); 659 $mixpanelHandler->trackEvent('pluginInstalled', ['$device_id' => $uuid, 'primaryDomain' => wp_parse_url(site_url())['host'], 'wp_id' => $current_user->ID, 'wp_email' => $current_user->user_email, 'wp_username' => $current_user->user_login, 'wp_display_name' => $current_user->display_name ]);684 $mixpanelHandler->trackEvent('pluginInstalled', ['$device_id' => $uuid, 'primaryDomain' => self::removeWWW(wp_parse_url(site_url())['host']), 'wp_id' => $current_user->ID, 'wp_email' => $current_user->user_email, 'wp_username' => $current_user->user_login, 'wp_display_name' => $current_user->display_name ]); 660 685 $current_data['isInstalled'] = true; 661 686 $current_data['mixpanelUUID'] = $uuid; … … 669 694 $mixpanelHandler = new MixpanelHandler(); 670 695 if(isset($current_data['acsbuserId'])) { 671 $mixpanelHandler->trackEvent('pluginInstalled', ['userId' => $current_data['acsbuserId'], 'primaryDomain' => wp_parse_url(site_url())['host'], 'wp_id' => $current_user->ID, 'wp_email' => $current_user->user_email, 'wp_username' => $current_user->user_login, 'wp_display_name' => $current_user->display_name ]);696 $mixpanelHandler->trackEvent('pluginInstalled', ['userId' => $current_data['acsbuserId'], 'primaryDomain' => self::removeWWW(wp_parse_url(site_url())['host']), 'wp_id' => $current_user->ID, 'wp_email' => $current_user->user_email, 'wp_username' => $current_user->user_login, 'wp_display_name' => $current_user->display_name ]); 672 697 } 673 698 else { 674 $mixpanelHandler->trackEvent('pluginInstalled', ['$device_id' => $current_data['mixpanelUUID'], 'primaryDomain' => wp_parse_url(site_url())['host'], 'wp_id' => $current_user->ID, 'wp_email' => $current_user->user_email, 'wp_username' => $current_user->user_login, 'wp_display_name' => $current_user->display_name ]);675 } 676 $mixpanelHandler->trackEvent('pluginUninstalled', ['primaryDomain' => wp_parse_url(site_url())['host']]);699 $mixpanelHandler->trackEvent('pluginInstalled', ['$device_id' => $current_data['mixpanelUUID'], 'primaryDomain' => self::removeWWW(wp_parse_url(site_url())['host']), 'wp_id' => $current_user->ID, 'wp_email' => $current_user->user_email, 'wp_username' => $current_user->user_login, 'wp_display_name' => $current_user->display_name ]); 700 } 701 $mixpanelHandler->trackEvent('pluginUninstalled', ['primaryDomain' => self::removeWWW(wp_parse_url(site_url())['host'])]); 677 702 delete_option(ACCESSIBE_WP_OPTIONS_KEY); 678 703 delete_option(ACCESSIBE_WP_POINTERS_KEY); -
accessibe/trunk/readme.txt
r3219469 r3220122 4 4 Requires at least: 4.7 5 5 Tested up to: 6.7 6 Stable tag: 2. 16 Stable tag: 2.2 7 7 Requires PHP: 7.0 8 8 License: GPLv2 or later … … 58 58 59 59 == Changelog == 60 = v2.2 = 61 * 2025-01-10 62 * Bug fix 63 60 64 = v2.1 = 61 65 * 2025-01-09
Note: See TracChangeset
for help on using the changeset viewer.