--- a/accessibe/accessibe.php
+++ b/accessibe/accessibe.php
@@ -3,7 +3,7 @@
* Plugin Name: Web Accessibility by accessiBe
* Plugin URI: https://accessibe.com/
* Description: accessiBe is the #1 fully automated web accessibility solution. Protect your website from lawsuits and increase your potential audience.
- * Version: 2.11
+ * Version: 2.12
* Author: accessiBe
* Author URI: https://accessibe.com/
* License: GPLv2 or later
--- a/accessibe/accessiebe.php
+++ b/accessibe/accessiebe.php
@@ -14,9 +14,9 @@
use MixpanelMixpanel;
// Hook into WordPress after it has loaded fully
-add_action('plugins_loaded', 'handle_plugin_upgrade');
+add_action('plugins_loaded', 'accessibe_handle_plugin_upgrade');
-function handle_plugin_upgrade() {
+function accessibe_handle_plugin_upgrade() {
$old = 'accessiebe.php';
$new = 'accessibe.php';
@@ -41,12 +41,12 @@
// Update the active plugins option in the database.
update_option('active_plugins', $active_plugins);
- track_plugin_upgrade();
+ accessibe_track_plugin_upgrade();
}
}
-function track_plugin_upgrade() {
- $uuid = generateUuidV4();
+function accessibe_track_plugin_upgrade() {
+ $uuid = accessibe_generateUuidV4();
$current_user = wp_get_current_user();
if (!$current_user || empty($current_user->ID)) {
@@ -59,7 +59,7 @@
[
'$device_id' => $uuid,
'pluginVersion' => accessibe_get_plugin_version(),
- 'wordpressStoreName' => sanitizeDomain(wp_parse_url(site_url())['host']),
+ 'wordpressStoreName' => accessibe_sanitizeDomain(wp_parse_url(site_url())['host']),
'wordpressPluginVersionNumber' => accessibe_get_plugin_version(),
'wordpressAccountUserID' => $current_user->ID,
'wordpressUserEmail' => $current_user->user_email,
@@ -74,7 +74,7 @@
update_option('accessibeforwp_options', json_encode($current_data));
}
-function generateUuidV4() {
+function accessibe_generateUuidV4() {
$data = random_bytes(16);
// Set version to 4 and variant to 10xx
@@ -84,7 +84,7 @@
return vsprintf('%s%s-%s-%s-%s-%s%s%s', str_split(bin2hex($data), 4));
}
-function sanitizeDomain($domain) {
+function accessibe_sanitizeDomain($domain) {
// Use regex to replace "www." only at the beginning
return preg_replace("/^www./", "", strtolower($domain));
}
--- a/accessibe/class.accessibeforwp.php
+++ b/accessibe/class.accessibeforwp.php
@@ -198,13 +198,13 @@
*/
public static function accessibe_render_js_in_footer() {
$accessibe_options = self::accessibe_get_options();
- $current_domain = self::sanitizeDomain(wp_parse_url(site_url())['host']);
+ $current_domain = self::accessibe_sanitizeDomain(wp_parse_url(site_url())['host']);
// $current_domain = '9cc3-2405-201-5c0f-d070-14fd-b303-b02-1999.ngrok-free.app';
if ((!isset($accessibe_options['accessibe']) && (!isset($accessibe_options['script']) || !isset($accessibe_options['script'][$current_domain])))
|| (isset($accessibe_options['accessibe']) && 'enabled' != $accessibe_options['accessibe'] && (!isset($accessibe_options['script']) || !isset($accessibe_options['script'][$current_domain])))
|| (isset($accessibe_options["script"][$current_domain]) && $accessibe_options["script"][$current_domain]['widgetStatus'] != true)) {
- echo "<script>console.log(".wp_json_encode($accessibe_options).")</script>";
+ echo "<script>console.log(".wp_json_encode("acsb not injected").")</script>";
}
if (isset($accessibe_options["script"][$current_domain]) && $accessibe_options["script"][$current_domain]['widgetStatus'] != true) {
@@ -330,13 +330,13 @@
'userId' => absint($current_user->ID),
'email' => $user_email,
'fullName' => $display_name,
- 'storeId' => self::sanitizeDomain(wp_parse_url(site_url())['host']),
+ 'storeId' => self::accessibe_sanitizeDomain(wp_parse_url(site_url())['host']),
'wapperApp' => array(
'name' => 'WordPress',
'version' => self::accessibe_get_plugin_version() . ''
),
'mixpanelProps' => array (
- 'wordpressStoreName' => self::sanitizeDomain(wp_parse_url(site_url())['host']),
+ 'wordpressStoreName' => self::accessibe_sanitizeDomain(wp_parse_url(site_url())['host']),
'wordpressPluginVersionNumber' => self::accessibe_get_plugin_version() . '',
'wordpressAccountUserID' => absint($current_user->ID),
'wordpressUserEmail' => $user_email,
@@ -364,7 +364,7 @@
public static function get_current_domain() {
$current_domain = wp_parse_url(site_url())['host'];
- return self::sanitizeDomain($current_domain);
+ return self::accessibe_sanitizeDomain($current_domain);
}
public static function accessibe_domain_list_ajax() {
@@ -634,10 +634,10 @@
return $accessibe_text;
} // accessibe_admin_footer_text
- public static function sanitizeDomain($domain) {
+ public static function accessibe_sanitizeDomain($domain) {
// Use regex to replace "www." only at the beginning
return preg_replace("/^www./", "", strtolower($domain));
- } // sanitizeDomain
+ } // accessibe_sanitizeDomain
/**
@@ -711,7 +711,7 @@
return $accessibe_options;
}// accessibe_get_options
- public static function generateUuidV4() {
+ public static function accessibe_generateUuidV4() {
$data = random_bytes(16);
// Set version to 4 and variant to 10xx
@@ -908,7 +908,7 @@
}
if(!isset($current_data['acsbUserId']) && !isset($current_data['mixpanelUUID'])) {
- $uuid = self::generateUuidV4();
+ $uuid = self::accessibe_generateUuidV4();
$current_data['mixpanelUUID'] = $uuid;
}
@@ -917,10 +917,10 @@
$mixpanelHandler = new MixpanelHandler();
if(isset($current_data['acsbUserId'])) {
- $mixpanelHandler->trackEvent('pluginUpgraded', ['userId' => $current_data['acsbUserId'], 'pluginVersion' => $latest_version, 'previousPluginVersion' => $previous_version, 'wordpressStoreName' => self::sanitizeDomain(wp_parse_url(site_url())['host']), 'wordpressPluginVersionNumber' => self::accessibe_get_plugin_version() . '', 'wordpressAccountUserID' => $current_user->ID, 'wordpressUserEmail' => $current_user->user_email, 'wordpressUsername' => $current_user->user_login ]);
+ $mixpanelHandler->trackEvent('pluginUpgraded', ['userId' => $current_data['acsbUserId'], 'pluginVersion' => $latest_version, 'previousPluginVersion' => $previous_version, 'wordpressStoreName' => self::accessibe_sanitizeDomain(wp_parse_url(site_url())['host']), 'wordpressPluginVersionNumber' => self::accessibe_get_plugin_version() . '', 'wordpressAccountUserID' => $current_user->ID, 'wordpressUserEmail' => $current_user->user_email, 'wordpressUsername' => $current_user->user_login ]);
}
else {
- $mixpanelHandler->trackEvent('pluginUpgraded', ['$device_id' => $current_data['mixpanelUUID'], 'pluginVersion' => $latest_version, 'previousPluginVersion' => $previous_version, 'wordpressStoreName' => self::sanitizeDomain(wp_parse_url(site_url())['host']), 'wordpressPluginVersionNumber' => self::accessibe_get_plugin_version() . '', 'wordpressAccountUserID' => $current_user->ID, 'wordpressUserEmail' => $current_user->user_email, 'wordpressUsername' => $current_user->user_login ]);
+ $mixpanelHandler->trackEvent('pluginUpgraded', ['$device_id' => $current_data['mixpanelUUID'], 'pluginVersion' => $latest_version, 'previousPluginVersion' => $previous_version, 'wordpressStoreName' => self::accessibe_sanitizeDomain(wp_parse_url(site_url())['host']), 'wordpressPluginVersionNumber' => self::accessibe_get_plugin_version() . '', 'wordpressAccountUserID' => $current_user->ID, 'wordpressUserEmail' => $current_user->user_email, 'wordpressUsername' => $current_user->user_login ]);
}
update_option(ACCESSIBE_WP_OPTIONS_KEY, json_encode($current_data));
}
@@ -949,10 +949,10 @@
$current_data = json_decode(get_option(ACCESSIBE_WP_OPTIONS_KEY), true);
$data_to_check = self::accessibe_get_options();
if(empty($data_to_check)) {
- $uuid = self::generateUuidV4();
+ $uuid = self::accessibe_generateUuidV4();
$current_user = wp_get_current_user();
$mixpanelHandler = new MixpanelHandler();
- $mixpanelHandler->trackEvent('pluginInstalled', ['$device_id' => $uuid, 'wordpressStoreName' => self::sanitizeDomain(wp_parse_url(site_url())['host']), 'wordpressPluginVersionNumber' => self::accessibe_get_plugin_version() . '', 'wordpressAccountUserID' => $current_user->ID, 'wordpressUserEmail' => $current_user->user_email, 'wordpressUsername' => $current_user->user_login ]);
+ $mixpanelHandler->trackEvent('pluginInstalled', ['$device_id' => $uuid, 'wordpressStoreName' => self::accessibe_sanitizeDomain(wp_parse_url(site_url())['host']), 'wordpressPluginVersionNumber' => self::accessibe_get_plugin_version() . '', 'wordpressAccountUserID' => $current_user->ID, 'wordpressUserEmail' => $current_user->user_email, 'wordpressUsername' => $current_user->user_login ]);
$current_data['mixpanelUUID'] = $uuid;
$current_data['pluginVersion'] = self::accessibe_get_plugin_version() . '';
update_option(ACCESSIBE_WP_OPTIONS_KEY, json_encode($current_data));
@@ -964,16 +964,16 @@
$current_user = wp_get_current_user();
if(!isset($current_data['acsbUserId']) && !isset($current_data['mixpanelUUID'])) {
- $uuid = self::generateUuidV4();
+ $uuid = self::accessibe_generateUuidV4();
$current_data['mixpanelUUID'] = $uuid;
}
$mixpanelHandler = new MixpanelHandler();
if(isset($current_data['acsbUserId'])) {
- $mixpanelHandler->trackEvent('pluginUninstalled', ['userId' => $current_data['acsbUserId'], 'wordpressStoreName' => self::sanitizeDomain(wp_parse_url(site_url())['host']), 'wordpressPluginVersionNumber' => self::accessibe_get_plugin_version() . '', 'wordpressAccountUserID' => $current_user->ID, 'wordpressUserEmail' => $current_user->user_email, 'wordpressUsername' => $current_user->user_login ]);
+ $mixpanelHandler->trackEvent('pluginUninstalled', ['userId' => $current_data['acsbUserId'], 'wordpressStoreName' => self::accessibe_sanitizeDomain(wp_parse_url(site_url())['host']), 'wordpressPluginVersionNumber' => self::accessibe_get_plugin_version() . '', 'wordpressAccountUserID' => $current_user->ID, 'wordpressUserEmail' => $current_user->user_email, 'wordpressUsername' => $current_user->user_login ]);
}
else {
- $mixpanelHandler->trackEvent('pluginUninstalled', ['$device_id' => $current_data['mixpanelUUID'], 'wordpressStoreName' => self::sanitizeDomain(wp_parse_url(site_url())['host']), 'wordpressPluginVersionNumber' => self::accessibe_get_plugin_version() . '', 'wordpressAccountUserID' => $current_user->ID, 'wordpressUserEmail' => $current_user->user_email, 'wordpressUsername' => $current_user->user_login ]);
+ $mixpanelHandler->trackEvent('pluginUninstalled', ['$device_id' => $current_data['mixpanelUUID'], 'wordpressStoreName' => self::accessibe_sanitizeDomain(wp_parse_url(site_url())['host']), 'wordpressPluginVersionNumber' => self::accessibe_get_plugin_version() . '', 'wordpressAccountUserID' => $current_user->ID, 'wordpressUserEmail' => $current_user->user_email, 'wordpressUsername' => $current_user->user_login ]);
}
delete_option(ACCESSIBE_WP_OPTIONS_KEY);
delete_option(ACCESSIBE_WP_POINTERS_KEY);