Skip to:

Opened 10 years ago

Closed 8 years ago

Last modified 7 years ago

#5639 closed defect (bug)

Function screen_icon() is deprecated since wp 3.8.

Reported by: lenasterg's profile lenasterg Owned by:
Milestone: 2.4 Priority: low
Severity: minor Version:
Component: Core Keywords:
Cc: alexander.berthelsen@…


I noticed that in various files of Buddypress the screen_icon function is used.
This function is deprecated since wordpress 3.8.
Do you think it is better to remove it or to replace it with a Buddypress speficic function?

Below are the places where screen_icon appear.

Change History (5)

#1 @boonebgorges
10 years ago

  • Milestone changed from Awaiting Review to Future Release

Do you think it is better to remove it or to replace it with a Buddypress speficic function?

We still support version 3.6+ of WordPress, so I don't think it's wise to remove it altogether.

We could create a BP-specific wrapper function, which would look something like this:

function bp_screen_icon() {
    echo bp_get_screen_icon();

function bp_get_screen_icon() {
    global $wp_version;
    if ( version_compare( $wp_version, '3.8', '<=' ) ) {
        return get_screen_icon();

But, given that the current use of screen_icon() doesn't raise any deprecated notices, I'm tempted to just leave it as-is, and then remove it altogether when we drop support for WP 3.6 and 3.7.

I'll put this into Future Release. lenasterg, if you or someone else feels like writing a patch along the lines of what I've suggested, I suppose there's no harm in putting it in. If not, this ticket will serve as a reminder to remove the calls to screen_icon() after we've dropped support for older versions of WP.

#2 @johnjamesjacoby
9 years ago

  • Component changed from Component - Any/All to Tools - Warnings/Notices

#3 @lakrisgubben
8 years ago

  • Cc alexander.berthelsen@… added
  • Milestone Future Release deleted
  • Status changed from new to closed

All calls to screen_icon has been removed since so this ticket can be closed. :)

#4 @DJPaul
8 years ago

  • Milestone set to 2.4

#5 @DJPaul
7 years ago

  • Component changed from Tools - Warnings/Notices to Core
Note: See TracTickets for help on using tickets.