Opened 9 years ago
Closed 4 years ago
#40979 closed defect (bug) (wontfix)
add_rewrite_endpoint() doesn't work when applied to unattached media
| Reported by: | henry.wright | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Rewrite Rules | Version: | |
| Severity: | normal | Keywords: | close |
| Cc: | Focuses: |
Description
add_rewrite_endpoint( 'foo', EP_ATTACHMENT ); doesn't seem to be working for unattached media items. For example visiting the following returns a 404:
example.com/attachment-slug/foo/
Change History (3)
#2
@
9 years ago
Agreed this makes sense as is if you consider unattached media to not be "attachments". I think the confusion arises because of the post_type.
#3
@
4 years ago
- Milestone Awaiting Review
- Resolution → wontfix
- Status new → closed
I concur that this works "correctly" and that this can be closed. Reminder to others that you can still comment on closed issues as well as have them re-opened should more/better/different information become available.
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
This makes sense to me as-is, although isn't what would be expected by some.
EP_ATTACHMENTapplies to attachment rules only, these rules are for attached media only, ie./2017/post-name/attachment-name/.It does not apply to the page rules, which is how the unattached media is queried.
For reference, here's the rewrite rule hit:
This is quite possibly a wontfix.