[wp-trac] [WordPress Trac] #23847: Media Manager default "link to" setting overriding custom setting

WordPress Trac noreply at wordpress.org
Fri Mar 22 17:58:41 UTC 2013


#23847: Media Manager default "link to" setting overriding custom setting
-----------------------------+--------------------------
 Reporter:  joshkadis        |       Type:  defect (bug)
   Status:  new              |   Priority:  normal
Milestone:  Awaiting Review  |  Component:  General
  Version:  trunk            |   Severity:  minor
 Keywords:                   |
-----------------------------+--------------------------
 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

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/23847>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list