Skip to:
Content

BuddyPress.org

Ticket #7325: 7325-xprofile-anonymous-functions.diff

File 7325-xprofile-anonymous-functions.diff, 727 bytes (added by tw2113, 8 years ago)
  • src/bp-xprofile/bp-xprofile-admin.php

    diff --git src/bp-xprofile/bp-xprofile-admin.php src/bp-xprofile/bp-xprofile-admin.php
    index 00778d0..590adf0 100644
    function bp_xprofile_admin_form_field_types( $select_field_type ) { 
    682682                printf( '<optgroup label="%1$s">', esc_attr( $category ) );  // Already i18n'd in each profile type class.
    683683
    684684                // Sort these fields types alphabetically.
    685                 uasort( $fields, create_function( '$a, $b', 'return strnatcmp( $a[1]->name, $b[1]->name );' ) );
     685                uasort( $fields, function( $a, $b ) { return strnatcmp( $a[1]->name, $b[1]->name ); } );
    686686
    687687                foreach ( $fields as $field_type_obj ) {
    688688                        $field_name     = $field_type_obj[0];