Skip to content
This repository was archived by the owner on Oct 6, 2023. It is now read-only.

ability to filter with_front arg#6

Open
mrwweb wants to merge 1 commit intoedwardr:masterfrom
mrwweb:with_front_filter
Open

ability to filter with_front arg#6
mrwweb wants to merge 1 commit intoedwardr:masterfrom
mrwweb:with_front_filter

Conversation

@mrwweb
Copy link
Contributor

@mrwweb mrwweb commented Mar 25, 2015

This introduces a staffer_with_front filter to change the staff post type's rewrite['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' => false is probably a more sensible default but changing it at this point would probably break sites.

@edwardr
Copy link
Owner

edwardr commented Mar 26, 2015

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.

@mrwweb
Copy link
Contributor Author

mrwweb commented Mar 26, 2015

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/.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Ability to change with_front

2 participants