Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
06/04/2024 02:30:49 AM (18 months ago)
Author:
espellcaste
Message:

WPCS: Part X: miscellaneous fixes for some of the files of the core component.

Follow-up to [13901]

See #9164 and #7228

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-core/bp-core-rest-api.php

    r13890 r13903  
    302302 * @since 5.0.0
    303303 *
    304  * @param array|string $list List of strings.
     304 * @param array|string $collection List of strings.
    305305 * @return array Sanitized array of strings.
    306306 */
    307 function bp_rest_sanitize_string_list( $list ) {
    308     if ( ! is_array( $list ) ) {
    309         $list = preg_split( '/[\s,]+/', $list );
    310     }
    311 
    312     return array_unique( array_map( 'sanitize_text_field', $list ) );
     307function bp_rest_sanitize_string_list( $collection ) {
     308    if ( ! is_array( $collection ) ) {
     309        $collection = preg_split( '/[\s,]+/', $collection );
     310    }
     311
     312    return array_unique( array_map( 'sanitize_text_field', $collection ) );
    313313}
    314314
Note: See TracChangeset for help on using the changeset viewer.