[wp-trac] [WordPress Trac] #35153: Default link target for media files is none

WordPress Trac noreply at wordpress.org
Thu Dec 31 04:50:16 UTC 2015


#35153: Default link target for media files is none
--------------------------------------------------+-----------------------
 Reporter:  Clorith                               |       Owner:  azaozz
     Type:  defect (bug)                          |      Status:  assigned
 Priority:  normal                                |   Milestone:  4.4.1
Component:  Media                                 |     Version:  4.4
 Severity:  normal                                |  Resolution:
 Keywords:  has-patch needs-testing dev-feedback  |     Focuses:  ui
--------------------------------------------------+-----------------------
Changes (by azaozz):

 * keywords:  has-patch 2nd-opinion => has-patch needs-testing dev-feedback


Comment:

 In 35153.5.diff:
 - Check if an attachment is image and if not ensure the link is set to
 something else than 'none'.
 - Introduces wp.media.controller.Library.isImageAttachment().

 While testing this discovered another bug: changing the `settings` object
 in `defaultDisplaySettings()` changes `this._defaultDisplaySettings` as it
 is a reference to it. So clicking on "embeddable" attachment sets
 `this._defaultDisplaySettings.link = 'embed'` which is used for all other
 attachments that are clicked after that. Had to clone
 `this._defaultDisplaySettings` to keep it unchanged.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/35153#comment:15>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list