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-core/bp-core-template.php

    r13844 r13878  
    473473         */
    474474        $options = apply_filters( 'bp_search_form_type_select_options', $options );
    475         foreach( (array) $options as $option_value => $option_title ) {
     475        foreach ( (array) $options as $option_value => $option_title ) {
    476476                $selection_box .= sprintf( '<option value="%s">%s</option>', esc_attr( $option_value ), esc_html( $option_title ) );
    477477        }
     
    679679                $attributes = (array) apply_filters( 'bp_get_form_field_attributes', $attributes, $name );
    680680
    681                 foreach( $attributes as $attr => $value ) {
     681                foreach ( $attributes as $attr => $value ) {
    682682                        // Numeric keyed array.
    683683                        if (is_numeric( $attr ) ) {
     
    32203220                        // Add current user member types.
    32213221                        if ( $member_types = bp_get_member_type( bp_displayed_user_id(), false ) ) {
    3222                                 foreach( $member_types as $member_type ) {
     3222                                foreach ( $member_types as $member_type ) {
    32233223                                        $bp_classes[] = sprintf( 'member-type-%s', esc_attr( $member_type ) );
    32243224                                }
     
    35093509                        $submenus = array();
    35103510
    3511                         foreach( $nav_menu->children as $sub_menu ) {
     3511                        foreach ( $nav_menu->children as $sub_menu ) {
    35123512                                $submenu = new stdClass;
    35133513                                $submenu->class  = array( 'menu-child' );
Note: See TracChangeset for help on using the changeset viewer.