Opened 12 years ago
Closed 9 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)
#5
@
10 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 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].