WordPress.org

Make WordPress Core

Opened 5 years ago

Closed 3 years ago

#23847 closed defect (bug) (fixed)

Media Manager default "link to" setting overriding custom setting

Reported by: joshkadis Owned by:
Milestone: 4.4 Priority: normal
Severity: minor Version: 2.7
Component: Media Keywords:
Focuses: Cc:

Description

http://core.trac.wordpress.org/browser/trunk/wp-includes/js/media-views.js#L444

The line I'm looking at is this:

  link:  defaultProps.link  || getUserSetting( 'urlbutton', 'file' )

getUserSetting( 'urlbutton', 'file' ) returns the correct value that I set in the theme on 'init' with set_user_setting( 'urlbutton', 'none' ) but that value is not saved on this line because defaultProps.link has already been set to 'file'.

I can't figure out why it tests for a default setting before a user setting, and not the other way around

Change History (8)

#1 @SergeyBiryukov
5 years ago

  • Component changed from General to Media

#2 @SergeyBiryukov
5 years ago

  • Milestone changed from Awaiting Review to 3.6

#3 @nacin
5 years ago

  • Milestone changed from 3.6 to Future Release
  • Version changed from trunk to 2.7

This is from pre-3.5 and was added back in 3.5.1. I know, it's stupid, and it deserves careful consideration. The change in 3.5.1 was to restore previous behavior, as it was tripping people up. See [23262].

#4 @ocean90
4 years ago

#29073 was marked as a duplicate.

#5 @designsimply
4 years ago

Chiming in here to say we're getting reports about confusion from users on WordPress.com where the "Link To" setting in Attachment Display Settings is not sticky. I think the settings saves properly, but the UI isn't picking it up. See #29073 for more details.

This ticket was mentioned in IRC in #wordpress-dev by sheri. View the logs.


4 years ago

#8 @wonderboymusic
3 years ago

  • Milestone changed from Future Release to 4.4
  • Resolution set to fixed
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.