Opened 10 months ago
Closed 8 months ago
#21451 closed enhancement (fixed)
Default Widgets don't all use selected() consistently
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Priority: | normal | Milestone: | 3.5 |
| Component: | Widgets | Version: | 3.4.1 |
| Severity: | trivial | Keywords: | has-patch |
| 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)
iamfriendly — 10 months ago
comment:1
iamfriendly — 10 months 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.
SergeyBiryukov — 10 months ago
comment:2
SergeyBiryukov — 10 months 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.
comment:3
iamfriendly — 10 months 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
- Summary changed from (minor)Default Widgets don't all use selected() consistently to Default Widgets don't all use selected() consistently

Patch for use of selected() in default widgets