fix: keep the block title tag and drop Rank Math's relocated copy
Rank Math moves _wp_render_title_tag off wp_head into its own rank_math/head block, but it does not know about the block-theme renderer that replaced it, so both rendered. The previous release removed the block renderer and kept the relocated one, which fixed the duplicate but left the page depending on a plugin that may print nothing at all: Rank Math skips its entire frontend until its setup wizard completes, and in that state the page had no <title> and no social tags. Remove the relocated copy instead. Both carry the same text, since Rank Math supplies it through pre_get_document_title, and the block renderer survives when the plugin is absent or silent. The removal needs no guard: with no Rank Math, rank_math/head holds no callbacks. For the same reason chrnx_has_seo_plugin() now asks whether an SEO plugin actually printed its head, not whether one happens to be installed. Verified against a real Rank Math install in all three states: emitting, installed but silent, and absent. One title every time, never zero. The subscribe call to action now also runs on Pages and archives, so the Journal and the topic archives can convert, and it skips the Subscribe page itself rather than linking there from there. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
26 files changed
+47
-37
No files matched your search
@@ -2,7 +2,7 @@
|
||||
"$schema": "https://schemas.wp.org/trunk/block.json",
|
||||
"apiVersion": 3,
|
||||
"name": "chrnx/featured-stories",
|
||||
"version": "0.4.1",
|
||||
"version": "0.4.2",
|
||||
"title": "Featured Stories",
|
||||
"category": "theme",
|
||||
"description": "A sticky-led selection of topic-diverse stories.",
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"$schema": "https://schemas.wp.org/trunk/block.json",
|
||||
"apiVersion": 3,
|
||||
"name": "chrnx/footer-content",
|
||||
"version": "0.4.1",
|
||||
"version": "0.4.2",
|
||||
"title": "CHRNX Footer Content",
|
||||
"category": "theme",
|
||||
"description": "Display translated internal footer navigation and site credit.",
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"$schema": "https://schemas.wp.org/trunk/block.json",
|
||||
"apiVersion": 3,
|
||||
"name": "chrnx/header-tools",
|
||||
"version": "0.4.1",
|
||||
"version": "0.4.2",
|
||||
"title": "CHRNX Header Tools",
|
||||
"category": "theme",
|
||||
"description": "Display translated primary navigation and progressive site search.",
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"$schema": "https://schemas.wp.org/trunk/block.json",
|
||||
"apiVersion": 3,
|
||||
"name": "chrnx/journal-link",
|
||||
"version": "0.4.1",
|
||||
"version": "0.4.2",
|
||||
"title": "Journal Link",
|
||||
"category": "theme",
|
||||
"description": "Display a translated portable link to the full Journal.",
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"$schema": "https://schemas.wp.org/trunk/block.json",
|
||||
"apiVersion": 3,
|
||||
"name": "chrnx/journal-stream",
|
||||
"version": "0.4.1",
|
||||
"version": "0.4.2",
|
||||
"title": "Journal Stream",
|
||||
"category": "theme",
|
||||
"description": "The filterable chronological journal.",
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"$schema": "https://schemas.wp.org/trunk/block.json",
|
||||
"apiVersion": 3,
|
||||
"name": "chrnx/latest-podcast",
|
||||
"version": "0.4.1",
|
||||
"version": "0.4.2",
|
||||
"title": "Latest Podcast",
|
||||
"category": "theme",
|
||||
"description": "A linked card for the latest podcast episode.",
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"$schema": "https://schemas.wp.org/trunk/block.json",
|
||||
"apiVersion": 3,
|
||||
"name": "chrnx/mobile-menu-toggle",
|
||||
"version": "0.4.1",
|
||||
"version": "0.4.2",
|
||||
"title": "CHRNX Mobile Menu Toggle",
|
||||
"category": "theme",
|
||||
"description": "Progressively reveal the primary navigation on small screens.",
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"$schema": "https://schemas.wp.org/trunk/block.json",
|
||||
"apiVersion": 3,
|
||||
"name": "chrnx/podcast-meta",
|
||||
"version": "0.4.1",
|
||||
"version": "0.4.2",
|
||||
"title": "Podcast Metadata",
|
||||
"category": "theme",
|
||||
"description": "Safe episode details for the current post.",
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"$schema": "https://schemas.wp.org/trunk/block.json",
|
||||
"apiVersion": 3,
|
||||
"name": "chrnx/reading-time",
|
||||
"version": "0.4.1",
|
||||
"version": "0.4.2",
|
||||
"title": "Reading Time",
|
||||
"category": "theme",
|
||||
"description": "Display a localized estimate based on the current post content.",
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"$schema": "https://schemas.wp.org/trunk/block.json",
|
||||
"apiVersion": 3,
|
||||
"name": "chrnx/related-posts",
|
||||
"version": "0.4.1",
|
||||
"version": "0.4.2",
|
||||
"title": "Related Posts",
|
||||
"category": "theme",
|
||||
"description": "Related stories selected by topic, tags, and recency.",
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"$schema": "https://schemas.wp.org/trunk/block.json",
|
||||
"apiVersion": 3,
|
||||
"name": "chrnx/release-detail",
|
||||
"version": "0.4.1",
|
||||
"version": "0.4.2",
|
||||
"title": "Release Detail",
|
||||
"category": "theme",
|
||||
"description": "Album cover, listening links, and the ordered tracklist.",
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"$schema": "https://schemas.wp.org/trunk/block.json",
|
||||
"apiVersion": 3,
|
||||
"name": "chrnx/release-list",
|
||||
"version": "0.4.1",
|
||||
"version": "0.4.2",
|
||||
"title": "Release List",
|
||||
"category": "theme",
|
||||
"description": "The No Names releases, each linking to its album page.",
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"$schema": "https://schemas.wp.org/trunk/block.json",
|
||||
"apiVersion": 3,
|
||||
"name": "chrnx/selected-work",
|
||||
"version": "0.4.1",
|
||||
"version": "0.4.2",
|
||||
"title": "Selected Work",
|
||||
"category": "theme",
|
||||
"description": "Hand-picked projects first, then the most recent ones.",
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"$schema": "https://schemas.wp.org/trunk/block.json",
|
||||
"apiVersion": 3,
|
||||
"name": "chrnx/show-links",
|
||||
"version": "0.4.1",
|
||||
"version": "0.4.2",
|
||||
"title": "Show Links",
|
||||
"category": "theme",
|
||||
"description": "Where a podcast show can be listened to, rendered only when a URL exists.",
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"$schema": "https://schemas.wp.org/trunk/block.json",
|
||||
"apiVersion": 3,
|
||||
"name": "chrnx/site-brand",
|
||||
"version": "0.4.1",
|
||||
"version": "0.4.2",
|
||||
"title": "CHRNX Site Brand",
|
||||
"category": "theme",
|
||||
"description": "Display the local CHRNX wordmark linked to the site home.",
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"$schema": "https://schemas.wp.org/trunk/block.json",
|
||||
"apiVersion": 3,
|
||||
"name": "chrnx/subscribe-cta",
|
||||
"version": "0.4.1",
|
||||
"version": "0.4.2",
|
||||
"title": "Subscribe CTA",
|
||||
"category": "theme",
|
||||
"description": "A call to action linked to the configured subscribe page.",
|
||||
|
||||
@@ -9,6 +9,11 @@ $chrnx_url = chrnx_get_subscribe_url();
|
||||
if ( '' === $chrnx_url ) {
|
||||
return;
|
||||
}
|
||||
// page.html renders every Page, Subscribe included, and a call to action
|
||||
// pointing at the page you are already reading is just noise.
|
||||
if ( is_page( absint( get_option( 'chrnx_subscribe_page_id', 0 ) ) ) ) {
|
||||
return;
|
||||
}
|
||||
$chrnx_heading = chrnx_get_heading_level( $attributes['headingLevel'] ?? 2, 2 );
|
||||
?>
|
||||
<section <?php echo get_block_wrapper_attributes( array( 'class' => 'chrnx-subscribe-cta' ) ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"$schema": "https://schemas.wp.org/trunk/block.json",
|
||||
"apiVersion": 3,
|
||||
"name": "chrnx/subscribe-form",
|
||||
"version": "0.4.1",
|
||||
"version": "0.4.2",
|
||||
"title": "Subscribe Form",
|
||||
"category": "theme",
|
||||
"description": "The email subscription form, rendered only when a provider endpoint is configured.",
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"$schema": "https://schemas.wp.org/trunk/block.json",
|
||||
"apiVersion": 3,
|
||||
"name": "chrnx/theme-toggle",
|
||||
"version": "0.4.1",
|
||||
"version": "0.4.2",
|
||||
"title": "Theme Toggle",
|
||||
"category": "theme",
|
||||
"description": "Choose a light, dark, or system color theme.",
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"$schema": "https://schemas.wp.org/trunk/block.json",
|
||||
"apiVersion": 3,
|
||||
"name": "chrnx/topic-hero",
|
||||
"version": "0.4.1",
|
||||
"version": "0.4.2",
|
||||
"title": "Topic Hero",
|
||||
"category": "theme",
|
||||
"description": "A fixed-art hero for an editorial topic.",
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"$schema": "https://schemas.wp.org/trunk/block.json",
|
||||
"apiVersion": 3,
|
||||
"name": "chrnx/track-meta",
|
||||
"version": "0.4.1",
|
||||
"version": "0.4.2",
|
||||
"title": "Track Meta",
|
||||
"category": "theme",
|
||||
"description": "Player, listening links, and album for one song.",
|
||||
|
||||
Reference in new issue
Block a user