Make WordPress Core

Opened 14 years ago

Last modified 5 years ago

#15924 new enhancement

Add 'media_default_link_type' option to parallel 'image_default_link_type'

Reported by: goldenapples's profile goldenapples Owned by:
Milestone: Future Release Priority: normal
Severity: normal Version:
Component: Upload Keywords: dev-feedback needs-patch
Focuses: Cc:


It is often recommended that site owners change the 'image_default_link_type' option to "none" if they don't plan on linking to full size images often from their posts. The problem is that this also affects the default link type for other media (uploaded zip files, pdfs, etc.) Adding an additional option for 'media_default_link_type' which behaves in the same way would get around this problem.

Attachments (1)

15924.diff (1.2 KB) - added by goldenapples 14 years ago.
Adds option for media_default_link_type.

Download all attachments as: .zip

Change History (11)

14 years ago

Adds option for media_default_link_type.

#1 @goldenapples
14 years ago

  • Component changed from Media to Upload

#2 @mdawaffe
14 years ago

  • Keywords dev-feedback added
  • Milestone changed from Awaiting Review to Future Release

Could also put a filter in image_link_input_fields().

#3 @ryno267
13 years ago

agree. Images shouldn't default link to themselves. or the attachement page.. no need to index that. Images should be default w/ no link.

#4 @goto10
13 years ago

  • Cc dromsey@… added

#5 @nacin
12 years ago

Rather than adding a new option, we can just drop a filter on that value and ensure that $post gets passed to it.

#6 @goldenapples
12 years ago

I agree a filter is much better than adding a new option. I would like to see it default to "link to file", though, whatever the image_default_link_type setting is. Would this break much current usage?

I'm trying to brainstorm mainstream cases where people might want to link non-image media to an attachment page, and I can't think of any offhand. Maybe podcasting? I'm not sure. In any case, I think the hassle caused to the everyday site owner who has to remember to check an additional box when inserting pdfs or .zip downloads into post content could be alleviated by treating media and image links separately.

#7 @MadtownLems
12 years ago

A filter on this sounds great. Would core want to:

a) just add a filter but not change any current functionality without a plugin


b) also change some defaults so that images are not links, but other documents are

#8 @chriscct7
10 years ago

  • Keywords needs-patch added

#9 @chriscct7
9 years ago

  • Severity changed from minor to normal

#10 @desrosj
5 years ago

This needs some exploration to determine an approach that works in the current state of Core. Is anyone willing to shepherd this?

Note: See TracTickets for help on using tickets.