Skip to:
Content

BuddyPress.org

Changeset 5794


Ignore:
Timestamp:
02/15/2012 08:52:15 PM (13 years ago)
Author:
boonebgorges
Message:

Use wp_parse_id_list() for parsing exclude_fields parameter of BP_XProfile_Group::get(). See #3695. Props DJPaul.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-xprofile/bp-xprofile-classes.php

    r5792 r5794  
    155155       
    156156        // Support arrays and comma-separated strings
    157         if ( !empty( $exclude_fields ) && !is_array( $exclude_fields ) ) {
    158             $exclude_fields = explode( ',', $exclude_fields );
    159         }
    160        
    161         // Sanitization - ensure that each field_id passed is an integer
    162         $exclude_fields_cs = array();
    163         foreach( (array)$exclude_fields as $exclude_field ) {
    164             $efint = (int)$exclude_field;
    165             if ( !empty( $efint ) ) {
    166                 $exclude_fields_cs[] = $efint;
    167             }
    168         }
     157        $exclude_fields_cs = wp_parse_id_list( $exclude_fields );
    169158       
    170159        // Visibility - Handled here so as not to be overridden by sloppy use of the
Note: See TracChangeset for help on using the changeset viewer.