Opened 10 years ago
Closed 10 years ago
#33664 closed defect (bug) (duplicate)
Create pretty permalinks for unlinked attachments
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 4.4 |
Component: | Permalinks | Keywords: | |
Focuses: | Cc: |
Description
The URL of an unlinked attachments always uses query params (for example: http://notizblog.org/?attachment_id=6702) if pretty permalinks are enabled or not.
This causes problems with feed links (for example: http://notizblog.org/?attachment_id=6702/feed/) and any other plugins that are using add_rewrite_endpoint
(for example: https://github.com/swissspidy/oEmbed-API/blob/master/classes/class-plugin.php#L88)
Change History (4)
#1
@
10 years ago
- Keywords needs-patch added
- Milestone changed from Awaiting Review to Future Release
- Owner set to swissspidy
- Status changed from new to assigned
#2
@
10 years ago
I think it is more consistent to use a simple pretty permalink for the attachment (for example http://notizblog.org/attachment/6702) because a lot of plugins might make the same mistake (like we did with the oEmbed API plugin). It is recommended on several codex pages to check the permalink structure like this:
<?php if ( get_option('permalink_structure') ) { echo 'permalinks enabled'; } ?>
I can confirm this. The error lies in
get_post_comments_feed_link
which just appends/feed/
to the permalink if pretty permalinks are enabled. It should check for unattached attachments though.