| @@ -14,9 +14,9 @@ | ||
| 14 | 14 | * @wordpress-plugin |
| 15 | 15 | * Plugin Name: Search Atlas: The Premier AI SEO Plugin for Instant Optimization |
| 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.6.24 | |
| 18 | + * Version: 2.6.26 | |
| 19 | 19 | * Requires PHP: 8.1 |
| 20 | 20 | * Author: Search Atlas |
| 21 | 21 | * Author URI: https://searchatlas.com |
| 22 | 22 | * License: GPL v3 |
| @@ -35,14 +35,20 @@ | ||
| 35 | 35 | // Canonical sanitizer — required explicitly (not via the committed classmap) |
| 36 | 36 | // so it is guaranteed loadable everywhere canonicals are read or written. |
| 37 | 37 | require_once __DIR__ . '/includes/class-metasync-canonical-sanitizer.php'; |
| 38 | 38 | |
| 39 | +// Editor-settings feature flags — required explicitly for the same reason: they | |
| 40 | +// gate output in the OTTO buffer and in third-party filter callbacks, both of | |
| 41 | +// which can run before the classmap has resolved anything else. | |
| 42 | +require_once __DIR__ . '/includes/class-metasync-feature-flags.php'; | |
| 43 | +Metasync_Feature_Flags::register_invalidation(); | |
| 44 | + | |
| 39 | 45 | /** |
| 40 | 46 | * Currently plugin version. |
| 41 | 47 | * Start at version 1.0.0 and use SemVer - https://semver.org |
| 42 | 48 | * Rename this for your plugin and update it as you release new versions. |
| 43 | 49 | */ |
| 44 | -$metasync_version = '2.6.24'; | |
| 50 | +$metasync_version = '2.6.26'; | |
| 45 | 51 | define('METASYNC_VERSION', preg_match('/^\d+\.\d+/', $metasync_version) ? $metasync_version : '9.9.9'); |
| 46 | 52 | /** |
| 47 | 53 | * Define the current required php version |
| 48 | 54 | * This will be used to validate whether the user can install the plugin or not |
| @@ -359,9 +365,15 @@ | ||
| 359 | 365 | $bn = basename($file); |
| 360 | 366 | $content = @file_get_contents($file); |
| 361 | 367 | if (false !== $content) { |
| 362 | 368 | $tkey = 'metasync_vsm_' . md5($bn); |
| 363 | - set_transient($tkey, $content, 30 * DAY_IN_SECONDS); | |
| 369 | + // The news sitemap's entries are only valid inside Google News' | |
| 370 | + // 48-hour window, so it must not be migrated in under a 30-day | |
| 371 | + // TTL — that would re-introduce the staleness the generator's | |
| 372 | + // own bounded TTL exists to prevent. Regenerate-on-miss rebuilds | |
| 373 | + // it with a fresh date_query when this expires. | |
| 374 | + $ttl = ('news-sitemap.xml' === $bn) ? (int) (DAY_IN_SECONDS / 4) : 30 * DAY_IN_SECONDS; | |
| 375 | + set_transient($tkey, $content, $ttl); | |
| 364 | 376 | if (false !== get_transient($tkey)) { |
| 365 | 377 | @unlink($file); |
| 366 | 378 | $virtual_index[$bn] = $tkey; |
| 367 | 379 | if ($bn !== 'sitemap_index.xml' && $bn !== 'news-sitemap.xml' && $bn !== 'video-sitemap.xml') { |
| @@ -450,8 +462,23 @@ | ||
| 450 | 462 | MetaSync_DBMigration::cleanup_corrupted_canonicals(); |
| 451 | 463 | update_option('metasync_canonical_cleanup_done', 'done', false); |
| 452 | 464 | } |
| 453 | 465 | |
| 466 | + // One-time repair of Local Business logos corrupted to "http://<id>". | |
| 467 | + // The sanitizer fix stopped new corruption; this restores the | |
| 468 | + // attachment ID on sites that saved a logo before it. The corrupted | |
| 469 | + // value encodes the original ID exactly, so the rewrite is lossless. | |
| 470 | + // Claimed via add_option() — it fails when the row already exists, so | |
| 471 | + // concurrent requests can't run the repair twice, and the claim lands | |
| 472 | + // BEFORE the work: the repair itself is idempotent, and the read-side | |
| 473 | + // normalisation in the schema output and admin preview already | |
| 474 | + // protects output if a run is interrupted. | |
| 475 | + if (false === get_option('metasync_local_seo_logo_repair_done') | |
| 476 | + && add_option('metasync_local_seo_logo_repair_done', 'running', '', false)) { | |
| 477 | + MetaSync_DBMigration::repair_corrupted_local_seo_logo(); | |
| 478 | + update_option('metasync_local_seo_logo_repair_done', 'done', false); | |
| 479 | + } | |
| 480 | + | |
| 454 | 481 | // Migrate physical sitemap files on version update. |
| 455 | 482 | metasync_migrate_physical_sitemaps(); |
| 456 | 483 | |
| 457 | 484 | // Run full migration to ensure all tables are up to date |
| @@ -574,8 +601,13 @@ | ||
| 574 | 601 | } |
| 575 | 602 | $checked = true; |
| 576 | 603 | |
| 577 | 604 | require_once plugin_dir_path(__FILE__) . 'includes/class-metasync-activator.php'; |
| 605 | + | |
| 606 | + // Surface a persistently failing White Label import instead of | |
| 607 | + // retrying it silently on every admin request. | |
| 608 | + add_action('admin_notices', array('Metasync_Activator', 'render_whitelabel_import_failure_notice')); | |
| 609 | + | |
| 578 | 610 | Metasync_Activator::check_whitelabel_settings_update(); |
| 579 | 611 | } |
| 580 | 612 | |
| 581 | 613 | // Retry package imports on an authorized admin request when an update completed |