refactor: consolidate rewrite/plugin optimizations#15
Open
Conversation
- Create PostTypeSupport utility class with static methods for post type validation - Remove duplicated get_supported_post_types() and is_supported_post_type() methods from AlternateLinkHandler and RewriteHandler - Update all post type checks to use PostTypeSupport::is_supported() - Fix comment in AlternateLinkHandler from "published posts" to "published content" This eliminates ~42 lines of duplicated code and provides a single source of truth for post type support logic. No behavior changes. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> (cherry picked from commit e3ab727)
…istration Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> (cherry picked from commit 9e862b3)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> (cherry picked from commit 9534de6)
Restore original logic for non-lowercase .md extension detection. The simplified regex '/\.[Mm][Dd]$/' incorrectly matched lowercase .md extensions, causing valid requests to be rejected. The original two-part check correctly identifies only non-lowercase variants. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> (cherry picked from commit 69ff1f7)
This was referenced Feb 17, 2026
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.
This consolidates overlapping work from #10, #12, and #13 into one integration PR to reduce merge conflicts.
Included:
Notes: