Skip to:
Content

BuddyPress.org

Opened 11 years ago

Closed 9 years ago

Last modified 8 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@…

Description

Hi.
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.

https://buddypress.trac.wordpress.org/browser/trunk/src/bp-activity/bp-activity-admin.php#L587
https://buddypress.trac.wordpress.org/browser/trunk/src/bp-activity/bp-activity-admin.php#L901
https://buddypress.trac.wordpress.org/browser/trunk/src/bp-core/admin/bp-core-components.php#L24
https://buddypress.trac.wordpress.org/browser/trunk/src/bp-core/admin/bp-core-functions.php#L103
https://buddypress.trac.wordpress.org/browser/trunk/src/bp-core/admin/bp-core-settings.php#L270
https://buddypress.trac.wordpress.org/browser/trunk/src/bp-core/admin/bp-core-slugs.php#L24
https://buddypress.trac.wordpress.org/browser/trunk/src/bp-core/admin/bp-core-tools.php#L17
https://buddypress.trac.wordpress.org/browser/trunk/src/bp-forums/deprecated/1.6.php#L40
https://buddypress.trac.wordpress.org/browser/trunk/src/bp-groups/bp-groups-admin.php#L491
https://buddypress.trac.wordpress.org/browser/trunk/src/bp-groups/bp-groups-admin.php#L586
https://buddypress.trac.wordpress.org/browser/trunk/src/bp-groups/bp-groups-admin.php#L636
https://buddypress.trac.wordpress.org/browser/trunk/src/bp-members/bp-members-admin.php#L556
https://buddypress.trac.wordpress.org/browser/trunk/src/bp-members/bp-members-admin.php#L1293
https://buddypress.trac.wordpress.org/browser/trunk/src/bp-members/bp-members-admin.php#L1397
https://buddypress.trac.wordpress.org/browser/trunk/src/bp-xprofile/bp-xprofile-admin.php#L68
https://buddypress.trac.wordpress.org/browser/trunk/src/bp-xprofile/bp-xprofile-classes.php#L465
https://buddypress.trac.wordpress.org/browser/trunk/src/bp-members/bp-members-admin.php#L1168

Change History (5)

#1 @boonebgorges
11 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
10 years ago

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

#3 @lakrisgubben
9 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 https://buddypress.trac.wordpress.org/changeset/10229 so this ticket can be closed. :)

#4 @DJPaul
9 years ago

  • Milestone set to 2.4

#5 @DJPaul
8 years ago

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