Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
06/01/2024 04:26:18 PM (2 years ago)
Author:
espellcaste
Message:

WPCS: The modified code addresses all Squiz.ControlStructures.ControlSignature.SpaceAfterKeyword and Squiz.Functions.MultiLineFunctionDeclaration.SpaceAfterFunction issues specific to the foreach and function examples.

See #7228

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-xprofile/bp-xprofile-filters.php

    r13806 r13878  
    426426                $values      = explode( ';', $field_value );
    427427
    428                 array_walk( $values, function( &$value, $key ) use ( $field_type, $field ) {
     428                array_walk( $values, function ( &$value, $key ) use ( $field_type, $field ) {
    429429                        $value = bp_xprofile_escape_field_data( $value, $field_type, $field->id );
    430430                } );
     
    480480
    481481        // Locate comment authors with WP accounts.
    482         foreach( (array) $comments as $comment ) {
     482        foreach ( (array) $comments as $comment ) {
    483483                if ( $comment->user_id ) {
    484484                        $user_ids[] = $comment->user_id;
     
    493493        // Pull up the xprofile fullname of each commenter.
    494494        if ( $fullnames = bp_core_get_user_displaynames( $user_ids ) ) {
    495                 foreach( (array) $fullnames as $user_id => $user_fullname ) {
     495                foreach ( (array) $fullnames as $user_id => $user_fullname ) {
    496496                        $users[ $user_id ] = trim( stripslashes( $user_fullname ) );
    497497                }
     
    499499
    500500        // Loop through and match xprofile fullname with commenters.
    501         foreach( (array) $comments as $i => $comment ) {
     501        foreach ( (array) $comments as $i => $comment ) {
    502502                if ( ! empty( $comment->user_id ) ) {
    503503                        if ( ! empty( $users[ $comment->user_id ] ) ) {
Note: See TracChangeset for help on using the changeset viewer.