Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
01/02/2017 08:13:14 PM (7 years ago)
Author:
tw2113
Message:

Removes usage of create_function across various BuddyPress components.

See #7325.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-friends/classes/class-bp-friends-friendship.php

    r11242 r11366  
    645645
    646646        // Sort and structure as expected in legacy function.
    647         usort( $last_activities, create_function( '$a, $b', '
    648             if ( $a["date_recorded"] == $b["date_recorded"] ) {
     647        usort( $last_activities, function( $a, $b ) {
     648            if ( $a['date_recorded'] == $b['date_recorded'] ) {
    649649                return 0;
    650650            }
    651651
    652             return ( strtotime( $a["date_recorded"] ) < strtotime( $b["date_recorded"] ) ) ? 1 : -1;
    653         ' ) );
     652            return ( strtotime( $a['date_recorded'] ) < strtotime( $b['date_recorded'] ) ) ? 1 : -1;
     653        } );
    654654
    655655        $retval = array();
Note: See TracChangeset for help on using the changeset viewer.