diff --git a/changelog.txt b/changelog.txt index 5ebdeeb..2eeae6c 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,29 +1,5 @@ == Changelog == -= 1.2.2 = - -_Release date: 2026-08-24_ - -**Changed** - -* Manager (by ROBOTSTXT) detection now uses the ecosystem presence constant ROBOTSTXT_MANAGER_NOTICED (Manager 1.6.2+); for older Manager versions it falls back to a plugin-list scan. Same behaviour, faster and path-independent detection. -* Removed the leftover robotstxt-updater.php PHPCS exclusion rule (the file was removed in 1.2.1). - -**Compatibility** - -* WordPress: 4.9.8 - 7.1 -* PHP: 8.0 - 8.5 -* WP-CLI: 2.x - -**Tests** - -* PHP Coding Standards: 3.13.6 -* WordPress Coding Standards: 3.4.1 -* PHPStan: level 9 (2.2.9) -* PHPUnit: 9.6.36 (257 tests) -* Composer dev dependencies updated: PHPStan 2.2.9, Mockery 1.6.15, WordPress hook stubs (wp-hooks/wordpress-core) 1.13.0 -* Plugin Check (PCP): not run (no WP-CLI in build environment) - = 1.2.1 = _Release date: 2026-08-17_ diff --git a/includes/class-robotstxt-og-manager-notice.php b/includes/class-robotstxt-og-manager-notice.php index 81008fd..f1469db 100644 --- a/includes/class-robotstxt-og-manager-notice.php +++ b/includes/class-robotstxt-og-manager-notice.php @@ -25,6 +25,14 @@ if ( ! defined( 'ABSPATH' ) ) { */ class Robotstxt_OG_Manager_Notice { + /** + * Basename of the Manager (by ROBOTSTXT) plugin. + * + * @since 1.2.1 + * @var string + */ + const MANAGER_BASENAME = 'robotstxt-manager/robotstxt-manager.php'; + /** * Query argument used to dismiss the notice. * @@ -58,38 +66,14 @@ class Robotstxt_OG_Manager_Notice { const MANAGER_URL = 'https://www.robotstxt.software/plugins/robotstxt-manager/'; /** - * Returns whether Manager (by ROBOTSTXT) is installed and active. + * Whether the Manager (by ROBOTSTXT) plugin is installed and active. * - * Uses the ecosystem presence constant (Manager 1.6.2+) and falls back - * to a plugin-list scan for older Manager versions. + * @since 1.2.1 * - * @since 1.2.1 Introduced as a basename is_plugin_active() check. - * @since 1.2.2 Constant check first; plugin-list scan only as fallback. - * - * @return bool True when Manager is present and activated. + * @return bool True if the Manager plugin is active. */ public static function is_manager_active(): bool { - if ( defined( 'ROBOTSTXT_MANAGER_NOTICED' ) && ROBOTSTXT_MANAGER_NOTICED ) { - return true; - } - - if ( ! function_exists( 'get_plugins' ) ) { - require_once ABSPATH . 'wp-admin/includes/plugin.php'; - } - - foreach ( get_plugins() as $file => $data ) { - $slug = dirname( $file ); - - if ( '.' === $slug ) { - $slug = basename( $file, '.php' ); - } - - if ( 'robotstxt-manager' === $slug ) { - return is_plugin_active( $file ); - } - } - - return false; + return is_plugin_active( self::MANAGER_BASENAME ); } /** diff --git a/languages/robotstxt-og-ca.mo b/languages/robotstxt-og-ca.mo index 83f069f..e621114 100644 Binary files a/languages/robotstxt-og-ca.mo and b/languages/robotstxt-og-ca.mo differ diff --git a/languages/robotstxt-og-ca.po b/languages/robotstxt-og-ca.po index 260746e..9474158 100644 --- a/languages/robotstxt-og-ca.po +++ b/languages/robotstxt-og-ca.po @@ -4,7 +4,7 @@ # msgid "" msgstr "" -"Project-Id-Version: OpenGraph (by ROBOTSTXT) 1.2.2\n" +"Project-Id-Version: OpenGraph (by ROBOTSTXT) 1.2.1\n" "Report-Msgid-Bugs-To: https://git.robotstxt.es/ROBOTSTXT/robotstxt-og/" "issues\n" "POT-Creation-Date: 2026-03-28\n" diff --git a/languages/robotstxt-og-es_ES.mo b/languages/robotstxt-og-es_ES.mo index 4ce0d7d..6749e60 100644 Binary files a/languages/robotstxt-og-es_ES.mo and b/languages/robotstxt-og-es_ES.mo differ diff --git a/languages/robotstxt-og-es_ES.po b/languages/robotstxt-og-es_ES.po index 0010038..7adb7ca 100644 --- a/languages/robotstxt-og-es_ES.po +++ b/languages/robotstxt-og-es_ES.po @@ -4,7 +4,7 @@ # msgid "" msgstr "" -"Project-Id-Version: OpenGraph (by ROBOTSTXT) 1.2.2\n" +"Project-Id-Version: OpenGraph (by ROBOTSTXT) 1.2.1\n" "Report-Msgid-Bugs-To: https://git.robotstxt.es/ROBOTSTXT/robotstxt-og/" "issues\n" "POT-Creation-Date: 2026-03-28\n" diff --git a/languages/robotstxt-og.pot b/languages/robotstxt-og.pot index 70d6a56..7e38c11 100644 --- a/languages/robotstxt-og.pot +++ b/languages/robotstxt-og.pot @@ -2,7 +2,7 @@ # This file is distributed under the GPL v3 or later. msgid "" msgstr "" -"Project-Id-Version: OpenGraph (by ROBOTSTXT) 1.2.2\n" +"Project-Id-Version: OpenGraph (by ROBOTSTXT) 1.2.1\n" "Report-Msgid-Bugs-To: https://git.robotstxt.es/ROBOTSTXT/robotstxt-og/issues\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/readme.txt b/readme.txt index ebabe65..4ae5b02 100644 --- a/readme.txt +++ b/readme.txt @@ -3,9 +3,9 @@ Contributors: robotstxt, javiercasares Tags: opengraph, open graph, twitter card, social media, seo Requires at least: 4.9.8 Tested up to: 7.1 -Stable tag: 1.2.2 +Stable tag: 1.2.1 Requires PHP: 8.0 -Version: 1.2.2 +Version: 1.2.1 License: GPL-3.0-or-later License URI: https://www.gnu.org/licenses/gpl-3.0.txt @@ -180,14 +180,6 @@ Yes. The plugin hooks into `wp_head` for direct tag injection and filters Yoast/ == Changelog == -= 1.2.2 = - -_Release date: 2026-08-24_ - -* Changed: Manager (by ROBOTSTXT) detection now uses the ecosystem presence constant `ROBOTSTXT_MANAGER_NOTICED` (Manager 1.6.2+); for older Manager versions it falls back to the plugin-list scan. -* Changed: Tested up to WordPress 7.1 (requires 4.9.8, re-verified); PHP 8.0 – 8.5 (re-verified). -* Dev: Composer dev dependencies updated (PHPStan 2.2.9, Mockery 1.6.15, WordPress hook stubs 1.13.0). - = 1.2.1 = _Release date: 2026-08-17_ @@ -211,6 +203,19 @@ _Release date: 2026-08-10_ * Changed: Minimum supported WordPress lowered from 6.8 to 4.9.8 (verified by WP-Compat). * Changed: Minimum supported PHP lowered from 8.2 to 8.0 (verified by the PHPCompatibility scan). += 1.1.0 = + +_Release date: 2026-03-28_ + +* Fixed: Fatal `TypeError` in `handle_thumbnail_change()` when `deleted_post_meta` passes an array of meta IDs as the first argument. +* Security: Added SSRF protection — outbound HEAD requests now block private and reserved IP ranges. +* Security: Replaced deprecated `FILTER_SANITIZE_SPECIAL_CHARS` with `FILTER_SANITIZE_FULL_SPECIAL_CHARS`. +* Added: GDPR Privacy API — custom OG title and description are included in WordPress personal data export and erase. +* Changed: Settings page and REST API now require `edit_others_posts`, allowing editors to manage OG settings. +* Changed: Minimum supported WordPress version raised to 6.8. +* Changed: Added `Network: true` header confirming Multisite compatibility. +* Added: PHPUnit test suite (Brain\Monkey) covering SSRF protection, format detection, and cache clearing. + = Previous versions = If you want to see the full changelog, visit the [changelog](https://www.robotstxt.software/plugins/robotstxt-og/) page. diff --git a/robotstxt-og.php b/robotstxt-og.php index 5bd9037..f5f28a0 100644 --- a/robotstxt-og.php +++ b/robotstxt-og.php @@ -3,7 +3,7 @@ * Plugin Name: OpenGraph (by ROBOTSTXT) * Plugin URI: https://www.robotstxt.software/plugins/robotstxt-og/ * Description: Intelligent Open Graph image fallback for social media crawlers. Automatically detects and serves compatible image formats (JPEG/PNG) when modern formats (AVIF/WebP) are used as featured images. - * Version: 1.2.2 + * Version: 1.2.1 * Requires at least: 4.9.8 * Requires PHP: 8.0 * Author: ROBOTSTXT @@ -17,7 +17,7 @@ * Contributors: robotstxt, javiercasares * * @package ROBOTSTXT_OG - * @version 1.2.2 + * @version 1.2.1 */ if ( ! defined( 'ABSPATH' ) ) { @@ -25,7 +25,7 @@ if ( ! defined( 'ABSPATH' ) ) { } // Define plugin constants. -define( 'ROBOTSTXT_OG_VERSION', '1.2.2' ); +define( 'ROBOTSTXT_OG_VERSION', '1.2.1' ); define( 'ROBOTSTXT_OG_PATH', plugin_dir_path( __FILE__ ) ); define( 'ROBOTSTXT_OG_URL', plugin_dir_url( __FILE__ ) ); define( 'ROBOTSTXT_OG_BASENAME', plugin_basename( __FILE__ ) ); diff --git a/uninstall.php b/uninstall.php index ff7e8a8..f6fd537 100644 --- a/uninstall.php +++ b/uninstall.php @@ -5,7 +5,7 @@ * Fired when the plugin is uninstalled. * * @package ROBOTSTXT_OG - * @version 1.2.2 + * @version 1.2.1 */ if ( ! defined( 'WP_UNINSTALL_PLUGIN' ) ) { diff --git a/update.json b/update.json new file mode 100644 index 0000000..669e791 --- /dev/null +++ b/update.json @@ -0,0 +1,27 @@ +{ + "name": "OpenGraph (by ROBOTSTXT)", + "slug": "robotstxt-og", + "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", + "last_updated": "2026-08-10", + "author": "ROBOTSTXT", + "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": "", + "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.

", + "changelog": "" + }, + "banners": { + "low": "", + "high": "" + }, + "icons": { + "1x": "", + "2x": "" + } +}