Opened 13 years ago
Closed 13 years ago
#21451 closed enhancement (fixed)
Default Widgets don't all use selected() consistently
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 3.5 | Priority: | normal |
Severity: | trivial | Version: | 3.4.1 |
Component: | Widgets | Keywords: | has-patch |
Focuses: | Cc: |
Description
I was looking through the default widgets /wp-includes/default-widgets.php to see how certain things were achieved (w.r.t menus) and noticed that on 3 of the default widgets the selected() function wasn't used.
Could well be reasons for this, but I couldn't spot anything obvious, so thought I'd write a very quick patch for that (attached).
It couldn't be any more minor, but thought I'd point it out anyway.
Attachments (2)
Change History (7)
#1
@
13 years ago
As an aside, I've not produced a diff before, so I've probably got that entirely wrong. I tried to follow the instructions from the handbook and from Mark's guide, so if I've done something wrong on that front I apologise and would appreciate a point in the right direction.
#2
@
13 years ago
- Milestone changed from Awaiting Review to 3.5
Thanks for the patch, it looks proper. Some edits in 21451.patch:
- Added
false
as a third parameter (since the result should be concatenated rather than printed directly). - Reformatted the last block for consistency with the first one.
- Adjusted spaces as per the coding standards.
#3
@
13 years ago
Ah, nice catches Sergey. I clearly need more coffee before submitting core patches (well, diffs). If I spot any more trivialities, I'll be sure to tidy them up.
Thanks again
Patch for use of selected() in default widgets