From b81dfe037ee215e9855b09855019842482689e95 Mon Sep 17 00:00:00 2001 From: Matthias Pfefferle Date: Fri, 25 Sep 2026 09:46:47 +0200 Subject: [PATCH 1/2] fix fatal error on classicpress --- opengraph.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/opengraph.php b/opengraph.php index e4f6872..55af2c2 100644 --- a/opengraph.php +++ b/opengraph.php @@ -371,6 +371,11 @@ function opengraph_thumbnail_image_ids( $post_id ) { * @return Generator The attachment IDs. */ function opengraph_content_image_ids( $post_id ) { + // ClassicPress does not ship the HTML API. + if ( ! class_exists( 'WP_HTML_Tag_Processor' ) ) { + return; + } + $tags = new WP_HTML_Tag_Processor( get_post_field( 'post_content', $post_id, 'raw' ) ); while ( $tags->next_tag( 'img' ) ) { From ffb3e6144e02abbd36bc59afd687e5071dd304f4 Mon Sep 17 00:00:00 2001 From: Matthias Pfefferle Date: Fri, 25 Sep 2026 09:47:45 +0200 Subject: [PATCH 2/2] version 3.0.1 --- opengraph.php | 2 +- readme.md | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/opengraph.php b/opengraph.php index 55af2c2..94aede3 100644 --- a/opengraph.php +++ b/opengraph.php @@ -5,7 +5,7 @@ * Description: Adds Open Graph metadata to your pages * Author: Will Norris & Matthias Pfefferle * Author URI: https://github.com/pfefferle/wordpress-opengraph - * Version: 3.0.0 + * Version: 3.0.1 * License: Apache License, Version 2.0 * License URI: https://www.apache.org/licenses/LICENSE-2.0.html * Requires at least: 6.2 diff --git a/readme.md b/readme.md index 25ff65c..933a123 100644 --- a/readme.md +++ b/readme.md @@ -4,7 +4,7 @@ - Tags: social, opengraph, ogp, facebook - Requires at least: 6.2 - Tested up to: 7.1 -- Stable tag: 3.0.0 +- Stable tag: 3.0.1 - Requires PHP: 7.4 - License: Apache License, Version 2.0 - License URI: https://www.apache.org/licenses/LICENSE-2.0.html @@ -64,6 +64,10 @@ The plugin populates the meta 'name' attribute alongside the 'property' attribut Project maintained on github at [pfefferle/wordpress-opengraph](https://github.com/pfefferle/wordpress-opengraph). +### 3.0.1 (Sep 25, 2026) + + - fixed a fatal error on ClassicPress, which does not ship the HTML API (#50) + ### 3.0.0 (Sep 18, 2026) - simpler image handling: one pass over the post content, catches gallery, media & text and nested block images