Compare commits
11 changed files with 61 additions and 69 deletions
|
|
@ -1,29 +1,5 @@
|
||||||
== Changelog ==
|
== 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 =
|
= 1.2.1 =
|
||||||
|
|
||||||
_Release date: 2026-08-17_
|
_Release date: 2026-08-17_
|
||||||
|
|
|
||||||
|
|
@ -25,6 +25,14 @@ if ( ! defined( 'ABSPATH' ) ) {
|
||||||
*/
|
*/
|
||||||
class Robotstxt_OG_Manager_Notice {
|
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.
|
* 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/';
|
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
|
* @since 1.2.1
|
||||||
* to a plugin-list scan for older Manager versions.
|
|
||||||
*
|
*
|
||||||
* @since 1.2.1 Introduced as a basename is_plugin_active() check.
|
* @return bool True if the Manager plugin is active.
|
||||||
* @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 {
|
public static function is_manager_active(): bool {
|
||||||
if ( defined( 'ROBOTSTXT_MANAGER_NOTICED' ) && ROBOTSTXT_MANAGER_NOTICED ) {
|
return is_plugin_active( self::MANAGER_BASENAME );
|
||||||
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.
|
|
@ -4,7 +4,7 @@
|
||||||
#
|
#
|
||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
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/"
|
"Report-Msgid-Bugs-To: https://git.robotstxt.es/ROBOTSTXT/robotstxt-og/"
|
||||||
"issues\n"
|
"issues\n"
|
||||||
"POT-Creation-Date: 2026-03-28\n"
|
"POT-Creation-Date: 2026-03-28\n"
|
||||||
|
|
|
||||||
Binary file not shown.
|
|
@ -4,7 +4,7 @@
|
||||||
#
|
#
|
||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
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/"
|
"Report-Msgid-Bugs-To: https://git.robotstxt.es/ROBOTSTXT/robotstxt-og/"
|
||||||
"issues\n"
|
"issues\n"
|
||||||
"POT-Creation-Date: 2026-03-28\n"
|
"POT-Creation-Date: 2026-03-28\n"
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
# This file is distributed under the GPL v3 or later.
|
# This file is distributed under the GPL v3 or later.
|
||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
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"
|
"Report-Msgid-Bugs-To: https://git.robotstxt.es/ROBOTSTXT/robotstxt-og/issues\n"
|
||||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||||
|
|
|
||||||
25
readme.txt
25
readme.txt
|
|
@ -3,9 +3,9 @@ Contributors: robotstxt, javiercasares
|
||||||
Tags: opengraph, open graph, twitter card, social media, seo
|
Tags: opengraph, open graph, twitter card, social media, seo
|
||||||
Requires at least: 4.9.8
|
Requires at least: 4.9.8
|
||||||
Tested up to: 7.1
|
Tested up to: 7.1
|
||||||
Stable tag: 1.2.2
|
Stable tag: 1.2.1
|
||||||
Requires PHP: 8.0
|
Requires PHP: 8.0
|
||||||
Version: 1.2.2
|
Version: 1.2.1
|
||||||
License: GPL-3.0-or-later
|
License: GPL-3.0-or-later
|
||||||
License URI: https://www.gnu.org/licenses/gpl-3.0.txt
|
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 ==
|
== 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 =
|
= 1.2.1 =
|
||||||
|
|
||||||
_Release date: 2026-08-17_
|
_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 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).
|
* 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 =
|
= Previous versions =
|
||||||
|
|
||||||
If you want to see the full changelog, visit the [changelog](https://www.robotstxt.software/plugins/robotstxt-og/) page.
|
If you want to see the full changelog, visit the [changelog](https://www.robotstxt.software/plugins/robotstxt-og/) page.
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
* Plugin Name: OpenGraph (by ROBOTSTXT)
|
* Plugin Name: OpenGraph (by ROBOTSTXT)
|
||||||
* Plugin URI: https://www.robotstxt.software/plugins/robotstxt-og/
|
* 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.
|
* 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 at least: 4.9.8
|
||||||
* Requires PHP: 8.0
|
* Requires PHP: 8.0
|
||||||
* Author: ROBOTSTXT
|
* Author: ROBOTSTXT
|
||||||
|
|
@ -17,7 +17,7 @@
|
||||||
* Contributors: robotstxt, javiercasares
|
* Contributors: robotstxt, javiercasares
|
||||||
*
|
*
|
||||||
* @package ROBOTSTXT_OG
|
* @package ROBOTSTXT_OG
|
||||||
* @version 1.2.2
|
* @version 1.2.1
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if ( ! defined( 'ABSPATH' ) ) {
|
if ( ! defined( 'ABSPATH' ) ) {
|
||||||
|
|
@ -25,7 +25,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Define plugin constants.
|
// 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_PATH', plugin_dir_path( __FILE__ ) );
|
||||||
define( 'ROBOTSTXT_OG_URL', plugin_dir_url( __FILE__ ) );
|
define( 'ROBOTSTXT_OG_URL', plugin_dir_url( __FILE__ ) );
|
||||||
define( 'ROBOTSTXT_OG_BASENAME', plugin_basename( __FILE__ ) );
|
define( 'ROBOTSTXT_OG_BASENAME', plugin_basename( __FILE__ ) );
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
* Fired when the plugin is uninstalled.
|
* Fired when the plugin is uninstalled.
|
||||||
*
|
*
|
||||||
* @package ROBOTSTXT_OG
|
* @package ROBOTSTXT_OG
|
||||||
* @version 1.2.2
|
* @version 1.2.1
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if ( ! defined( 'WP_UNINSTALL_PLUGIN' ) ) {
|
if ( ! defined( 'WP_UNINSTALL_PLUGIN' ) ) {
|
||||||
|
|
|
||||||
27
update.json
Normal file
27
update.json
Normal file
|
|
@ -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": "<p>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.</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’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": ""
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in a new issue