Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion opengraph.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -371,6 +371,11 @@ function opengraph_thumbnail_image_ids( $post_id ) {
* @return Generator<int> 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' ) ) {
Expand Down
6 changes: 5 additions & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
Loading