[wp-trac] [WordPress Trac] #13019: Allow multiple category widget dropdowns
WordPress Trac
wp-trac at lists.automattic.com
Thu Apr 15 18:13:31 UTC 2010
#13019: Allow multiple category widget dropdowns
-------------------------+--------------------------------------------------
Reporter: t31os_ | Owner: azaozz
Type: enhancement | Status: new
Priority: low | Milestone: 3.1
Component: Widgets | Version: 3.0
Severity: minor | Keywords: has-patch needs-testing
-------------------------+--------------------------------------------------
Although this may be a somewhat trivial and silly use of category widgets,
currently placing two category widgets onto the same page with the
dropdown option set results in having duplicate javascript and duplicative
identified select boxes.
Whilst the instance of each widget is unique, the select boxes displayed
at not given unique IDs or Names, resulting in valid markup, and resulting
in only the secondary select box operating correctly. The JS var gets
redeclared by the duplicative script, which gives precedence to the second
dropdown.
One use case would be a page that lists long archives and shows a jump
menu at both the top and bottom of the page. This would have to be done
directly in the template due to the widget restrictions at present.
I am attaching a patch that adds a static counter into the category widget
function, and gives each dropdown a unique identifier ID/Name, allowing
simultaneous use of several category dropdowns, the JS function is updated
appropriately to.
Code tested on IE7 and FF3, functionality remains the same as the original
code, minus the limitation mentioned above.
Feedback is appreciated, and please do re-tag if necessary.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/13019>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list