Make WordPress Core

Opened 14 years ago

Closed 14 years ago

#15377 closed defect (bug) (fixed)

Allow screen_icon() to return not echo

Reported by: aaroncampbell's profile aaroncampbell Owned by:
Milestone: 3.2 Priority: normal
Severity: normal Version:
Component: Administration Keywords: has-patch dev-feedback
Focuses: Cc:

Description

I'd like to see screen_icon() be able to return it's value rather than just echo it. I'm willing to patch it, but are we trying to stick to the get_*() functions, or do we want another parameter?

Attachments (3)

15377.001.diff (1.7 KB) - added by aaroncampbell 14 years ago.
15377.002.diff (818 bytes) - added by aaroncampbell 14 years ago.
15377.003.diff (824 bytes) - added by aaroncampbell 14 years ago.

Download all attachments as: .zip

Change History (12)

#1 @nacin
14 years ago

get_* would be nice.

#2 @nacin
14 years ago

  • Keywords needs-patch added; dev-feedback removed
  • Milestone changed from Awaiting Review to Future Release

#3 @aaroncampbell
14 years ago

  • Keywords has-patch added; needs-patch removed

The patch adds get_screen_icon() and uses it in screen_icon(). The only change is to use esc_attr on $name which is used as part of the div id.

#4 @aaroncampbell
14 years ago

  • Keywords 3.2-early added

Patch for the current trunk.

#5 @westi
14 years ago

Why not just build a string rather than use sprintf?

#6 @aaroncampbell
14 years ago

Good point. New patch without sprintf

#7 @aaroncampbell
14 years ago

  • Keywords 3.2-early removed
  • Milestone changed from Future Release to 3.2

#8 @jane
14 years ago

  • Keywords dev-feedback added

#9 @ryan
14 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [17656]) Introduce get_screen_icon(). Props aaroncampbell. fixes #15377

Note: See TracTickets for help on using tickets.