$remote Remote data.
- *
- * @return bool True if compatible.
- */
- private function is_compatible( array $remote ): bool {
- if ( ! empty( $remote['requires_php'] ) && is_string( $remote['requires_php'] ) ) {
- if ( version_compare( PHP_VERSION, $remote['requires_php'], '<' ) ) {
- return false;
- }
- }
-
- if ( ! empty( $remote['requires'] ) && is_string( $remote['requires'] ) ) {
- if ( version_compare( get_bloginfo( 'version' ), $remote['requires'], '<' ) ) {
- return false;
- }
- }
-
- return true;
- }
-
- /**
- * Handle manual cache clear via URL parameter.
- */
- public function handle_cache_clear(): void {
- // Check if this is a cache clear request first.
- $clear_cache = filter_input( INPUT_GET, 'robotstxt_clear_update_cache', FILTER_UNSAFE_RAW );
- if ( null === $clear_cache ) {
- return;
- }
-
- // This is a cache clear request - now verify nonce.
- $nonce_raw = filter_input( INPUT_GET, '_wpnonce', FILTER_SANITIZE_FULL_SPECIAL_CHARS );
- $nonce = $nonce_raw ? sanitize_text_field( wp_unslash( $nonce_raw ) ) : '';
-
- if ( ! wp_verify_nonce( $nonce, 'robotstxt_clear_update_cache' ) ) {
- wp_die( esc_html__( 'Security check failed', 'robotstxt-og' ) );
- }
-
- // Check permissions.
- if ( ! current_user_can( 'update_plugins' ) ) {
- wp_die( esc_html__( 'You do not have sufficient permissions to access this page.', 'robotstxt-og' ) );
- }
-
- $this->clear_cache();
- wp_safe_redirect( remove_query_arg( array( 'robotstxt_clear_update_cache', '_wpnonce' ) ) );
- exit;
- }
-
- /**
- * Clear update cache.
- */
- public function clear_cache(): void {
- delete_site_transient( $this->cache_key );
- delete_site_transient( 'update_plugins' );
- }
- }
-}
diff --git a/uninstall.php b/uninstall.php
index 25746ff..f6fd537 100644
--- a/uninstall.php
+++ b/uninstall.php
@@ -5,7 +5,7 @@
* Fired when the plugin is uninstalled.
*
* @package ROBOTSTXT_OG
- * @version 1.0.0
+ * @version 1.2.1
*/
if ( ! defined( 'WP_UNINSTALL_PLUGIN' ) ) {
@@ -79,6 +79,14 @@ function robotstxt_og_uninstall_cleanup(): void {
// Clear related transients.
delete_transient( 'robotstxt_og_diagnostics_cache' );
+ // Clear the legacy self-updater cache (updater removed in 1.2.1). Site
+ // transients are network-wide on Multisite, so one call covers all sites.
+ delete_site_transient( 'robotstxt_updater_' . md5( 'robotstxt-og/robotstxt-og.php' ) );
+
+ // Delete the per-user Manager notice dismissal flag. User meta is
+ // network-global on Multisite, so one call covers all users and sites.
+ delete_metadata( 'user', 0, '_robotstxt_og_manager_notice_dismissed', '', true );
+
// On Multisite, clean up site-by-site.
if ( is_multisite() ) {
$sites = get_sites(
diff --git a/update.json b/update.json
index e1b5a48..669e791 100644
--- a/update.json
+++ b/update.json
@@ -1,8 +1,8 @@
{
"name": "OpenGraph (by ROBOTSTXT)",
"slug": "robotstxt-og",
- "version": "1.2.0",
- "download_url": "https://git.robotstxt.es/ROBOTSTXT/robotstxt-og/releases/download/1.2.0/robotstxt-og-1.2.0.zip",
+ "version": "1.2.1",
+ "download_url": "https://git.robotstxt.es/ROBOTSTXT/robotstxt-og/releases/download/1.2.1/robotstxt-og-1.2.1.zip",
"requires": "4.9.8",
"requires_php": "8.0",
"tested": "7.0",
@@ -11,10 +11,10 @@
"author_profile": "https://www.robotstxt.es/",
"homepage": "https://git.robotstxt.es/ROBOTSTXT/robotstxt-og",
"description": "Intelligent Open Graph meta tags with automatic image fallback from AVIF/WebP to JPEG/PNG for social media crawlers. Outputs a complete set of og:* and twitter:* meta tags, detects incompatible image formats, and resolves JPEG/PNG alternatives via HTTP HEAD requests.",
- "changelog": "1.2.0 — 2026-08-10
- Added: Per-term Open Graph metadata for Categories and Tags (term edit page) — custom OG title, image, and description, exposed on term archives.
- Added: Manual og:image:alt override (per-post/term), emitted as og:image:alt and twitter:image:alt.
- Added: Per-post og:type override (Default / website / article); article:* sub-tags now emit on the resolved article type.
- Added: Twitter/X twitter:url (canonical) and per-post twitter:creator (author handle).
- Added: Platform integration tags (global settings) — Facebook fb:app_id/admins/pages, Pinterest p:domain_verify + disable-pinning toggle, Telegram telegram:channel, Slack slack-app-id.
- Added: Mobile / Web App tags (global settings) — theme-color, web-app name, PWA standalone toggle, iOS status bar style, format-detection; Open Graph namespace added to <html>.
1.1.0 — 2026-03-28
- Fixed: Fatal TypeError in handle_thumbnail_change(): the deleted_post_meta action passes an array of meta IDs as its first argument. The method signature now accepts int|array to handle both updated_post_meta and deleted_post_meta correctly.
- Security: Added SSRF protection to all outbound HTTP HEAD requests via is_safe_url() — private and reserved IP ranges are now blocked.
- Security: Replaced deprecated FILTER_SANITIZE_SPECIAL_CHARS with FILTER_SANITIZE_FULL_SPECIAL_CHARS throughout.
- Added: GDPR Privacy API support — custom OG title and description post meta are now included in WordPress personal data export and erase requests.
- Changed: Settings page and REST API now require edit_others_posts capability, allowing editors to manage OG settings and refresh fallback images.
- Changed: Minimum supported WordPress version raised to 6.8. Network: true header added.
- Added: PHPUnit test suite with Brain\\Monkey; covers SSRF logic, image format detection, and cache clearing.
1.0.0 — 2026-02-18
- Initial Release: First stable release of OpenGraph (by ROBOTSTXT).
",
+ "changelog": "",
"sections": {
"description": "Social media crawlers — Facebook, Twitter/X, LinkedIn, WhatsApp — do not support modern image formats such as AVIF and WebP. When a post’s featured image uses one of these formats, the platform shows a broken or missing image preview.
OpenGraph (by ROBOTSTXT) outputs a complete set of Open Graph and Twitter Card meta tags and solves this automatically. It detects whether each post’s featured image is in a supported format and, when needed, resolves and caches a compatible JPEG or PNG alternative.
- Full og:* and twitter:* meta tag output
- Automatic AVIF/WebP/GIF/BMP/SVG/TIFF detection with JPEG/PNG fallback
- Per-post OG title and description overrides via post editor meta box
- Global fallback image URL and homepage-specific image URL
- Yoast SEO and RankMath integration (no duplicate tags)
- Postmeta caching with automatic invalidation
- Admin panel with Settings, Tools, and Diagnostics tabs
- WP-CLI commands and REST API endpoints
- Multisite compatible
",
- "changelog": "1.2.0 — 2026-08-10
- Added: Per-term Open Graph metadata for Categories and Tags (term edit page) — custom OG title, image, and description, exposed on term archives.
- Added: Manual og:image:alt override (per-post/term), emitted as og:image:alt and twitter:image:alt.
- Added: Per-post og:type override (Default / website / article); article:* sub-tags now emit on the resolved article type.
- Added: Twitter/X twitter:url (canonical) and per-post twitter:creator (author handle).
- Added: Platform integration tags (global settings) — Facebook fb:app_id/admins/pages, Pinterest p:domain_verify + disable-pinning toggle, Telegram telegram:channel, Slack slack-app-id.
- Added: Mobile / Web App tags (global settings) — theme-color, web-app name, PWA standalone toggle, iOS status bar style, format-detection; Open Graph namespace added to <html>.
1.1.0 — 2026-03-28
- Fixed: Fatal TypeError in handle_thumbnail_change(): the deleted_post_meta action passes an array of meta IDs as its first argument. The method signature now accepts int|array to handle both updated_post_meta and deleted_post_meta correctly.
- Security: Added SSRF protection to all outbound HTTP HEAD requests via is_safe_url() — private and reserved IP ranges are now blocked.
- Security: Replaced deprecated FILTER_SANITIZE_SPECIAL_CHARS with FILTER_SANITIZE_FULL_SPECIAL_CHARS throughout.
- Added: GDPR Privacy API support — custom OG title and description post meta are now included in WordPress personal data export and erase requests.
- Changed: Settings page and REST API now require edit_others_posts capability, allowing editors to manage OG settings and refresh fallback images.
- Changed: Minimum supported WordPress version raised to 6.8. Network: true header added.
- Added: PHPUnit test suite with Brain\\Monkey; covers SSRF logic, image format detection, and cache clearing.
1.0.0 — 2026-02-18
- Initial Release: First stable release of OpenGraph (by ROBOTSTXT).
"
+ "changelog": ""
},
"banners": {
"low": "",