Compare commits

...
Author SHA1 Message Date
9cd3bb6cb2 v1.2.2 2026-08-24 12:20:42 +00:00
11 changed files with 69 additions and 61 deletions

View file

@ -1,5 +1,29 @@
== 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_

View file

@ -25,14 +25,6 @@ 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.
*
@ -66,14 +58,38 @@ class Robotstxt_OG_Manager_Notice {
const MANAGER_URL = 'https://www.robotstxt.software/plugins/robotstxt-manager/';
/**
* Whether the Manager (by ROBOTSTXT) plugin is installed and active.
* Returns whether Manager (by ROBOTSTXT) is installed and active.
*
* @since 1.2.1
* Uses the ecosystem presence constant (Manager 1.6.2+) and falls back
* to a plugin-list scan for older Manager versions.
*
* @return bool True if the Manager plugin is active.
* @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.
*/
public static function is_manager_active(): bool {
return is_plugin_active( self::MANAGER_BASENAME );
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;
}
/**

Binary file not shown.

View file

@ -4,7 +4,7 @@
#
msgid ""
msgstr ""
"Project-Id-Version: OpenGraph (by ROBOTSTXT) 1.2.1\n"
"Project-Id-Version: OpenGraph (by ROBOTSTXT) 1.2.2\n"
"Report-Msgid-Bugs-To: https://git.robotstxt.es/ROBOTSTXT/robotstxt-og/"
"issues\n"
"POT-Creation-Date: 2026-03-28\n"

Binary file not shown.

View file

@ -4,7 +4,7 @@
#
msgid ""
msgstr ""
"Project-Id-Version: OpenGraph (by ROBOTSTXT) 1.2.1\n"
"Project-Id-Version: OpenGraph (by ROBOTSTXT) 1.2.2\n"
"Report-Msgid-Bugs-To: https://git.robotstxt.es/ROBOTSTXT/robotstxt-og/"
"issues\n"
"POT-Creation-Date: 2026-03-28\n"

View file

@ -2,7 +2,7 @@
# This file is distributed under the GPL v3 or later.
msgid ""
msgstr ""
"Project-Id-Version: OpenGraph (by ROBOTSTXT) 1.2.1\n"
"Project-Id-Version: OpenGraph (by ROBOTSTXT) 1.2.2\n"
"Report-Msgid-Bugs-To: https://git.robotstxt.es/ROBOTSTXT/robotstxt-og/issues\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"

View file

@ -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.1
Stable tag: 1.2.2
Requires PHP: 8.0
Version: 1.2.1
Version: 1.2.2
License: GPL-3.0-or-later
License URI: https://www.gnu.org/licenses/gpl-3.0.txt
@ -180,6 +180,14 @@ 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_
@ -203,19 +211,6 @@ _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.

View file

@ -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.1
* Version: 1.2.2
* 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.1
* @version 1.2.2
*/
if ( ! defined( 'ABSPATH' ) ) {
@ -25,7 +25,7 @@ if ( ! defined( 'ABSPATH' ) ) {
}
// Define plugin constants.
define( 'ROBOTSTXT_OG_VERSION', '1.2.1' );
define( 'ROBOTSTXT_OG_VERSION', '1.2.2' );
define( 'ROBOTSTXT_OG_PATH', plugin_dir_path( __FILE__ ) );
define( 'ROBOTSTXT_OG_URL', plugin_dir_url( __FILE__ ) );
define( 'ROBOTSTXT_OG_BASENAME', plugin_basename( __FILE__ ) );

View file

@ -5,7 +5,7 @@
* Fired when the plugin is uninstalled.
*
* @package ROBOTSTXT_OG
* @version 1.2.1
* @version 1.2.2
*/
if ( ! defined( 'WP_UNINSTALL_PLUGIN' ) ) {

View file

@ -1,27 +0,0 @@
{
"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": "<p>Social media crawlers &#8212; Facebook, Twitter/X, LinkedIn, WhatsApp &#8212; do not support modern image formats such as AVIF and WebP. When a post&#8217;s featured image uses one of these formats, the platform shows a broken or missing image preview.</p><p><strong>OpenGraph (by ROBOTSTXT)</strong> outputs a complete set of Open Graph and Twitter Card meta tags and solves this automatically. It detects whether each post&#8217;s featured image is in a supported format and, when needed, resolves and caches a compatible JPEG or PNG alternative.</p><ul><li>Full og:* and twitter:* meta tag output</li><li>Automatic AVIF/WebP/GIF/BMP/SVG/TIFF detection with JPEG/PNG fallback</li><li>Per-post OG title and description overrides via post editor meta box</li><li>Global fallback image URL and homepage-specific image URL</li><li>Yoast SEO and RankMath integration (no duplicate tags)</li><li>Postmeta caching with automatic invalidation</li><li>Admin panel with Settings, Tools, and Diagnostics tabs</li><li>WP-CLI commands and REST API endpoints</li><li>Multisite compatible</li></ul>",
"changelog": ""
},
"banners": {
"low": "",
"high": ""
},
"icons": {
"1x": "",
"2x": ""
}
}