PluginProbe
Search Atlas SEO – OTTO AI SEO Automation for WordPress / 2.7.2
Search Atlas SEO – OTTO AI SEO Automation for WordPress v2.7.2
2.7.1 2.7.2 2.7.0 2.6.26 2.6.25 2.6.24 2.6.23 2.6.22 2.6.21 2.6.20 2.6.19 2.6.18 2.6.17 2.6.16 2.6.15 2.6.14 2.6.13 2.6.12 2.6.11 2.6.10 2.6.9 2.6.8 2.6.7 2.6.6 2.6.5 All 141 releases
← All changes | metasync.php +32 -5 2.7.1 → 2.7.2 View file →
@@ -14,9 +14,9 @@
14 14 * @wordpress-plugin
15 15 * Plugin Name: Search Atlas SEO - OTTO AI SEO Automation for WordPress
16 16 * Plugin URI: https://searchatlas.com/
17 17 * Description: Search Atlas SEO is an intuitive WordPress Plugin that transforms the most complicated, most labor-intensive SEO tasks into streamlined, straightforward processes. With a few clicks, the meta-bulk update feature automates the re-optimization of meta tags using AI to increase clicks. Stay up-to-date with the freshest Google Search data for your entire site or targeted URLs within the Meta Sync plug-in page.
18 - * Version: 2.7.1
18 + * Version: 2.7.2
19 19 * Requires PHP: 8.1
20 20 * Author: Search Atlas
21 21 * Author URI: https://searchatlas.com
22 22 * License: GPL v3
@@ -57,9 +57,9 @@
57 57 * Currently plugin version.
58 58 * Start at version 1.0.0 and use SemVer - https://semver.org
59 59 * Rename this for your plugin and update it as you release new versions.
60 60 */
61 -$metasync_version = '2.7.1';
61 +$metasync_version = '2.7.2';
62 62 define('METASYNC_VERSION', preg_match('/^\d+\.\d+/', $metasync_version) ? $metasync_version : '9.9.9');
63 63 /**
64 64 * Define the current required php version
65 65 * This will be used to validate whether the user can install the plugin or not
@@ -95,8 +95,18 @@
95 95 define('METASYNC_GA4_MEASUREMENT_ID', 'G-SBLWW1EMTJ');
96 96 define('METASYNC_GA4_API_SECRET', 'nMGs22mxQ3qVUy-aInqfZA');
97 97
98 98 /**
99 + * PostHog product analytics configuration.
100 + * The write key is a public project key embedded by design (same precedent
101 + * as the GA4 secret above); set METASYNC_POSTHOG_API_KEY in the environment
102 + * to override it - including to an empty string, which disables PostHog.
103 + */
104 +define('METASYNC_POSTHOG_HOST', 'https://posthog.internal.searchatlas.com');
105 +$metasync_posthog_key = getenv('METASYNC_POSTHOG_API_KEY');
106 +define('METASYNC_POSTHOG_API_KEY', false !== $metasync_posthog_key ? $metasync_posthog_key : 'phc_ntSayCJE7Ad9eBHRG6ygBaY4BJMa8rFjXcXESun9ftkh'); // gitleaks:allow -- public write-only PostHog project key
107 +
108 +/**
99 109 * Define whether to show the plugin status in WordPress admin top navigation bar
100 110 * Set to false to hide the status indicator
101 111 */
102 112 define('METASYNC_SHOW_ADMIN_BAR_STATUS', true);
@@ -253,9 +263,9 @@
253 263 #craft the message
254 264 sprintf(
255 265 '%s requires WordPress version %s or later. You are currently using version %s. Please update WordPress to activate this plugin.',
256 266 esc_html($plugin_name),
257 - METASYNC_MIN_WP,
267 + esc_html(METASYNC_MIN_WP),
258 268 esc_html($wp_version)
259 269 ),
260 270
261 271 #the plugin title as page title
@@ -275,9 +285,9 @@
275 285 #craft the message
276 286 sprintf(
277 287 '%s requires PHP version %s or later. You are currently using version %s. Please update PHP to activate this plugin.',
278 288 esc_html($plugin_name),
279 - METASYNC_MIN_PHP,
289 + esc_html(METASYNC_MIN_PHP),
280 290 esc_html($php_version)
281 291 ),
282 292
283 293 #the plugin title as page title
@@ -303,8 +313,12 @@
303 313 Metasync_Cache_Purge::purge_all('plugin_activation');
304 314
305 315 // Migrate physical sitemap files on activation.
306 316 metasync_migrate_physical_sitemaps();
317 +
318 + // Consent-gated analytics: the activation event only fires if the user
319 + // previously opted in (re-activation) — a brand-new install is OFF.
320 + Metasync_PostHog::get_instance()->track('plugin_activated', array());
307 321 }
308 322
309 323 // Log-sync removed - error monitoring now handled by Sentry
310 324 // require_once plugin_dir_path(__FILE__) . 'log-sync/log-sync.php';
@@ -499,8 +513,13 @@
499 513
500 514 // Run version-specific migrations first
501 515 MetaSync_DBMigration::run_version_migrations($current_version, $plugin_version);
502 516
517 + // The developer endpoint-switching panel has been removed. Reset its
518 + // persisted staging mode so upgrades cannot keep routing API requests
519 + // to staging without a visible warning or a supported recovery path.
520 + delete_option('metasync_dev_endpoint_mode');
521 +
503 522 // Migration for v2.7.0+: Remove AI Agent, switch to plugin auth token, make MCP always-on
504 523 if (version_compare($current_version, '2.7.0', '<')) {
505 524 // Remove old MCP API key option
506 525 delete_option('metasync_mcp_api_key');
@@ -747,9 +766,17 @@
747 766 echo '<script>window.__SA_DYO_INITIALIZED__=true;</script>' . "\n";
748 767 }
749 768 add_action('wp_head', 'metasync_output_dyo_init_flag', 1);
750 769
751 -// Runtime feature initialisers (GA4, API backoff, review notice, JWT accessor, debug mode) extracted to keep this entry file lean.
770 +// Shared analytics helper is loaded in all request contexts so server-side feature
771 +// events can use the same consent gate as admin analytics.
772 +require_once plugin_dir_path( __FILE__ ) . 'includes/class-metasync-posthog.php';
773 +require_once plugin_dir_path( __FILE__ ) . 'includes/class-metasync-analytics-consent-notice.php';
774 +
775 +/**
776 + * Runtime feature initialisers (GA4, API backoff, review notice, JWT accessor,
777 + * debug mode) extracted to keep this entry file lean.
778 + */
752 779 require_once plugin_dir_path( __FILE__ ) . 'includes/metasync-runtime-init.php';
753 780
754 781 /**
755 782 * Append a "Website Studio" post state to LPS-synced / MetaSync custom pages in