Issue 48 Minify regex rewrite rule broken by external plugin / theme#49
Merged
Conversation
added 2 commits
November 26, 2013 12:07
- Change add_rewrite_rule to a filter for the rewrite_rules_array to insure additional plugins will not cause the rules to break - Fixes #48
Contributor
There was a problem hiding this comment.
@c3mdigital I believe this needs to be array_merge(), as using + does some strange things where it will skip merging a item from the right array, if it has the same numeric index as an item in the left.
Contributor
Author
|
@westonruter Yes array_merge is the way to go. Fixed in 98094cc |
- Allows plugin to work with other plugins or themes who have filtered home_url
Contributor
There was a problem hiding this comment.
@c3mdigital it seems I need to reverse the order here, so that $new_rules will appear at the top. Otherwise, on one site I'm getting the page rewrite rule matching before the the minification rewrite rule can be reached.
If this is not done, then a page rewrite rule may match first
westonruter
added a commit
that referenced
this pull request
Dec 12, 2013
Fix rewrite rule broken by filtering home_url
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 solves the issue by adding the minify rewrite rule to the end of the rewrite_rules_array insuring in theory that the rule can not be broken by an external rewrite filter.
@westonruter please reivew