Skip to content

refactor: consolidate rewrite/plugin optimizations#15

Open
jdevalk wants to merge 4 commits intomainfrom
optimize/rewrite-integration
Open

refactor: consolidate rewrite/plugin optimizations#15
jdevalk wants to merge 4 commits intomainfrom
optimize/rewrite-integration

Conversation

@jdevalk
Copy link
Member

@jdevalk jdevalk commented Feb 17, 2026

This consolidates overlapping work from #10, #12, and #13 into one integration PR to reduce merge conflicts.

Included:

Notes:

Joost de Valk and others added 4 commits February 17, 2026 10:58
- 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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments