Opened 14 years ago
Last modified 6 years ago
#16843 new defect (bug)
wp_unique_post_slug() doesn't check pagination base when CPT has archive
Reported by: | scribu | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | minor | Version: | 3.1 |
Component: | Posts, Post Types | Keywords: | has-patch needs-unit-tests |
Focuses: | Cc: |
Description
Title says it all.
Attachments (5)
Change History (20)
#2
@
14 years ago
For better readability of the code, please add logical operators (mostly ||
in your patch) to the front of the line so it's easier to read how lines are in relation to each other.
#4
@
13 years ago
- Milestone changed from Awaiting Review to 3.1
What's the actual code change here? Just the final block of code, checking the pagination base?
#5
@
13 years ago
- Milestone changed from 3.1 to 3.2
You did mean 3.2, right?
The added line is indeed in the final block:
|| ( $post_type_obj->has_archive && $wp_rewrite->pagination_base == $slug )
#6
@
13 years ago
- Version set to 3.1
You probably meant to set the version, but I'll leave the milestone also.
#10
@
12 years ago
- Milestone changed from Future Release to 3.6
Patch refreshed so it applies cleanly against trunk
Note: See
TracTickets for help on using
tickets.
16843.diff has the added bonus that it avoids an unnecessary query, if any of the preceding conditions match.