[wp-trac] [WordPress Trac] #11433: Add 'id' argument to wp_dropdown_pages to match 'name' (needed for use in widget settings)

WordPress Trac wp-trac at lists.automattic.com
Sun Dec 20 06:49:58 UTC 2009


#11433: Add 'id' argument to wp_dropdown_pages to match 'name' (needed for use in
widget settings)
--------------------------+-------------------------------------------------
 Reporter:  jeremyclarke  |       Owner:  jeremyclarke           
     Type:  defect (bug)  |      Status:  new                    
 Priority:  normal        |   Milestone:  3.0                    
Component:  General       |     Version:  2.9                    
 Severity:  normal        |    Keywords:  has-patch needs-testing
--------------------------+-------------------------------------------------

Comment(by jeremyclarke):

 Replying to [comment:3 hakre]:
 > name and id are technically the same. it might be that this bug report
 is invalid.

 In the new APIs being added to wordpress form elements are being given
 name values that set up arrays, like {{{name="myoption[setting1]"}}} and
 id's that mirror the names but with underscores, like
 {{{id="myoption_setting1"}}}. When you start passing names that function
 as array definitions they don't really work as id's anymore, so they need
 to be different.

 This is why wp_dropdown_pages doesn't work with the Widgets API right now,
 it just makes sense to let people give seperate names and ids. The current
 patch also keeps the default behavior, so if you don't specify an id the
 name value is used. If you like making forms with id matching name you
 still can and won't have to add a new argument.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/11433#comment:5>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list