Changeset 3286862
- Timestamp:
- 05/03/2025 04:10:13 PM (11 months ago)
- Location:
- abmsense/trunk
- Files:
-
- 3 edited
-
abmsense.php (modified) (2 diffs)
-
activation_deactivation.php (modified) (3 diffs)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
abmsense/trunk/abmsense.php
r3286855 r3286862 3 3 Plugin Name: ABMsense - Visitor Identification for B2B Pipeline Growth 4 4 Description: Turn Site Visitors into Hot Leads– It's Marketing Magic! ABMsense is a powerful tool that helps you to identify and track your website visitors. It provides you with the information you need to turn your website visitors into hot leads. With ABMsense, you can track your website visitors, identify their company, and get detailed information about their visit. Go to Settings -> ABMsense to configure the plugin. 5 Version: 3.3.1 55 Version: 3.3.16 6 6 Author: Ashley Smith 7 7 Requires PHP: 7.2 … … 26 26 define('ABMSENSE_PREFIX', 'abmsense_'); 27 27 if (!defined('ABMSENSE_VERSION')) { 28 define('ABMSENSE_VERSION', '3.3.1 5');28 define('ABMSENSE_VERSION', '3.3.16'); 29 29 } 30 30 -
abmsense/trunk/activation_deactivation.php
r3286855 r3286862 69 69 // Function to handle plugin upgrades 70 70 function abmsense_upgrade_completed() { 71 $upgrade_completed = get_transient(ABMSENSE_PREFIX . 'upgrade_completed'); 71 // Check if we're in the middle of an upgrade 72 if (get_transient(ABMSENSE_PREFIX . 'upgrade_in_progress')) { 73 return; 74 } 72 75 73 if (!$upgrade_completed && abmsense_version_check()) { 74 // Set a transient to prevent multiple upgrade runs 75 set_transient(ABMSENSE_PREFIX . 'upgrade_completed', true, 30); 76 // Check if upgrade is needed 77 if (abmsense_version_check()) { 78 // Set a longer-lived transient to prevent multiple upgrade attempts 79 set_transient(ABMSENSE_PREFIX . 'upgrade_completed', true, DAY_IN_SECONDS); 76 80 77 // Update plugin data78 abmsense_update_plugin_data();81 // Set a short-lived transient to prevent concurrent upgrades 82 set_transient(ABMSENSE_PREFIX . 'upgrade_in_progress', true, 60); 79 83 80 // Run any additional upgrade tasks 81 abmsense_run_version_updates(); 84 try { 85 // Update plugin data 86 abmsense_update_plugin_data(); 87 88 // Run any additional upgrade tasks 89 abmsense_run_version_updates(); 90 } finally { 91 // Always clear the in-progress flag 92 delete_transient(ABMSENSE_PREFIX . 'upgrade_in_progress'); 93 } 82 94 } 83 95 } … … 85 97 // Function to update plugin data 86 98 function abmsense_update_plugin_data() { 99 // Check if we're in the middle of an upgrade 100 if (get_transient(ABMSENSE_PREFIX . 'upgrade_in_progress')) { 101 return; 102 } 103 87 104 $current_user = wp_get_current_user(); 88 105 $server_name = isset($_SERVER['SERVER_NAME']) ? sanitize_text_field(wp_unslash($_SERVER['SERVER_NAME'])) : ''; … … 91 108 // Get existing values or set defaults 92 109 $report_email = get_option(ABMSENSE_PREFIX . 'report_email') ?: $admin_email; 93 $report_frequency = get_option(ABMSENSE_PREFIX . 'report_frequency', 'weekly'); // Add 'weekly' as default110 $report_frequency = get_option(ABMSENSE_PREFIX . 'report_frequency', 'weekly'); 94 111 $is_consent = get_option(ABMSENSE_PREFIX . 'is_consent') ?: 0; 95 112 $date_registered = get_option(ABMSENSE_PREFIX . 'date_registered') ?: gmdate('Y-m-d'); -
abmsense/trunk/readme.txt
r3286855 r3286862 7 7 Tested up to: 6.8 8 8 Requires PHP: 7.2 9 Stable tag: 3.3.1 59 Stable tag: 3.3.16 10 10 License: GPLv2 or later 11 11 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 125 125 * Adding Export CSV inside the Identified Companies table 126 126 127 = 3.3.1 5=127 = 3.3.16 = 128 128 * Added: User Management table 129 129 * Added: Hot Lead Alerts
Note: See TracChangeset
for help on using the changeset viewer.