Skip to content

Release v2.4.0

Choose a tag to compare

@github-actions github-actions released this 05 Aug 16:41
· 7 commits to master since this release

Highlights

The Meta Tags module now covers single posts and pages, not just the homepage. Both scopes are independent switches, so you can run either one on its own.

New

  • Open Graph tags on single posts and pages (Settings > Omni Webmaster > SEO & Optimization, off by default): og:type=article, og:title, og:description, og:url, og:image with width / height / alt text, article:published_time, article:modified_time, plus the Twitter Card tags.
  • Article structured data (on by default once the switch above is enabled): BlogPosting / WebPage JSON-LD carrying the headline, publication and modification dates, author, and image, with a self-contained Organization publisher node so the reference resolves without the homepage output.
  • Share image fallback chain: featured image → first image in the post content → the site-wide default share image. A content image is resolved back to its attachment (size suffixes such as -1024x768 are stripped first) so full-size dimensions can be emitted; that lookup is cached in a transient keyed by the post's modified time, so editing a post invalidates it.
  • Descriptions use the manual excerpt when set, otherwise the first 160 characters of the content, with shortcodes and non-excerpt blocks stripped. Latin text backs off to the last whole word; CJK text is cut at the character limit.

Behaviour notes

  • Single-post output is off by default and carries an in-panel warning: most themes already print their own OG tags, and duplicates make social platforms pick the wrong title or image. Check a post's page source for og:title before enabling.
  • Password-protected posts never expose their content or content images — only the site-wide default share image is used.
  • A static front page always takes the homepage branch, so it never receives article markup.
  • The existing SEO plugin detection (Yoast SEO, Rank Math, All in One SEO, SEOPress, The SEO Framework) and the omni_meta_tags_enabled filter suppress both output paths.

New filters

Filter Default Purpose
omni_og_type article (website for pages) Override the Open Graph object type
omni_og_description_length 160 Maximum generated description length
omni_og_image_size full Registered image size used for the share image
omni_og_image_cache_expiration DAY_IN_SECONDS Lifetime of the resolved content-image cache

Also in this release

  • Bundled Traditional Chinese (zh_TW) translation and the .pot template updated for the new strings.
  • README, README.zh-TW, and readme.txt updated; the settings section is now titled "Meta Tags & Structured Data".

Verified

PHP 7.4 and 8.2 lint, plus a live WordPress 7.0 / PHP 8.2 install covering every fallback branch (featured image, content image, default image, password-protected, page, static front page, archives), both switch combinations, the SEO plugin conflict path, and the transient cache — no PHP notices on any request. Plugin Check reports no code-level issues.

Full Changelog: v2.3.0...v2.4.0