This repository was archived by the owner on Oct 6, 2023. It is now read-only.
Open
Conversation
Owner
|
I have some additional changes coming too. I still plan to review these this week. Looking to release the next update by end of the weekend. |
Contributor
Author
|
Sounds great. Given what I wrote, consider this just an idea and take it or leave it depending on your strategy. The goal is just to ensure there's a way where the permalink structure just doesn't end up with things like /blog/staff/person/. |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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 introduces a
staffer_with_frontfilter to change the staff post type'srewrite['with_front']arg. This is one possible way to resolve #4. With the filter, this is all that's needed to change the permalink structure:add_filter( 'staffer_with_front', '__return_false' );That's much better than the bulkier alternative given in #4.
That said, I wonder if a new option (defaulted to
true) would make more sense. If you've never had complaints about this issue before, then a filter is probably sufficient, otherwise, an option is probably better and this pull request should be rejected.Like I said at first, I think
'with_front' => falseis probably a more sensible default but changing it at this point would probably break sites.