Repository navigation
Conversation
With markdown_alternate_skip_noindexed on, these three pages still got a Markdown version, because is_noindexed() only reads Yoast SEO and Yoast does not mark them noindex on a default setup. WooCommerce keeps them out of search itself, through wp_robots while the HTML page renders, which a Markdown request cannot see. is_noindexed() now passes Yoast's answer through a new filter, markdown_alternate_is_noindexed, and the WooCommerce integration uses it for its cart, checkout and My account pages, matched with wc_get_page_id(). Every place that already honors the opt-in (the .md URL, ?format=markdown, the Accept redirect, the alternate link and llms.txt links) picks them up. Without the opt-in nothing changes. Tests: a standalone test for the filter, and WooCommerce integration checks that the three pages are skipped only with the opt-in and an ordinary page never. PHPStan passes; the baseline only counts the new wc_get_page_id() call.
Plugin readme previewOpen preview · Commit 24 passed · 2 warnings · 2 notes Warnings
Notes (2)
Passed checks (24)
Readme and PHP-header checks only; this does not test plugin runtime compatibility. |
Resolve the readme.txt changelog conflict: main released the earlier Unreleased entries as 1.3.0, so only this branch's two entries stay under Unreleased. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
1.3.0 was released before this filter was added. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
With
markdown_alternate_skip_noindexedon, the cart, checkout and My account pages still get a Markdown version, becauseis_noindexed()only reads Yoast SEO, and Yoast does not mark these pages noindex on a default setup. WooCommerce keeps them out of search itself, throughwp_robotswhile the HTML page renders, which a Markdown request never sees. They depend on the customer and have nothing an agent can use.Changes
PostTypeSupport::is_noindexed()passes Yoast's answer through a new filter,markdown_alternate_is_noindexed, so other plugins can mark posts noindexed by their own means.wc_get_page_id()..mdURL,?format=markdown, theAcceptredirect, the alternate link and llms.txt links) picks them up. Without the opt-in nothing changes.Tests
tests/run.php.wc_get_page_id()call.Drafted by Claude under my supervision and curation.