Skip to:
Content

bbPress.org

Changeset 5002


Ignore:
Timestamp:
06/25/2013 03:06:32 PM (13 years ago)
Author:
johnjamesjacoby
Message:

Constans album spatium. Consistent whitespace handling of foreach usages.

Location:
trunk
Files:
17 edited

Legend:

Unmodified
Added
Removed
  • trunk/bbpress.php

    r4996 r5002  
    376376
    377377        // Add the actions
    378         foreach( $actions as $class_action )
     378        foreach ( $actions as $class_action )
    379379            add_action( 'bbp_' . $class_action, array( $this, $class_action ), 5 );
    380380
  • trunk/includes/admin/admin.php

    r4995 r5002  
    210210
    211211            // Fudge the highlighted subnav item when on a bbPress admin page
    212             foreach( $hooks as $hook ) {
     212            foreach ( $hooks as $hook ) {
    213213                add_action( "admin_head-$hook", 'bbp_tools_modify_menu_highlight' );
    214214            }
  • trunk/includes/admin/functions.php

    r4950 r5002  
    9494
    9595            // Add our custom menus
    96             foreach( $custom_menus as $custom_menu ) {
     96            foreach ( $custom_menus as $custom_menu ) {
    9797                if ( array_search( $custom_menu, $menu_order ) ) {
    9898                    $bbp_menu_order[] = $custom_menu;
     
    247247
    248248        // Loop through tabs and build navigation
    249         foreach( array_values( $tabs ) as $tab_data ) {
     249        foreach ( array_values( $tabs ) as $tab_data ) {
    250250            $is_current = (bool) ( $tab_data['name'] == $active_tab );
    251251            $tab_class  = $is_current ? $active_class : $idle_class;
  • trunk/includes/admin/settings.php

    r4995 r5002  
    17431743
    17441744    // Loop through slugs to check
    1745     foreach( $the_core_slugs as $key => $value ) {
     1745    foreach ( $the_core_slugs as $key => $value ) {
    17461746
    17471747        // Get the slug
  • trunk/includes/admin/tools.php

    r4995 r5002  
    450450    $forums = get_posts( array( 'post_type' => bbp_get_forum_post_type(), 'numberposts' => -1 ) );
    451451    if ( !empty( $forums ) ) {
    452         foreach( $forums as $forum ) {
     452        foreach ( $forums as $forum ) {
    453453            bbp_update_forum_topic_count( $forum->ID );
    454454        }
     
    484484    $forums = get_posts( array( 'post_type' => bbp_get_forum_post_type(), 'numberposts' => -1 ) );
    485485    if ( !empty( $forums ) ) {
    486         foreach( $forums as $forum ) {
     486        foreach ( $forums as $forum ) {
    487487            bbp_update_forum_reply_count( $forum->ID );
    488488        }
     
    11781178
    11791179    if ( !empty( $sql_posts ) ) {
    1180         foreach( $sql_posts as $key => $value ) {
     1180        foreach ( $sql_posts as $key => $value ) {
    11811181            $sql_meta[] = $key;
    11821182        }
  • trunk/includes/common/functions.php

    r5000 r5002  
    862862
    863863        // Loop through post data
    864         foreach( $_post as $post_data ) {
     864        foreach ( $_post as $post_data ) {
    865865
    866866            // Check each user data for current word
     
    963963
    964964        // Loop through post data
    965         foreach( $_post as $post_data ) {
     965        foreach ( $_post as $post_data ) {
    966966
    967967            // Check each user data for current word
  • trunk/includes/common/shortcodes.php

    r4996 r5002  
    106106     */
    107107    private function add_shortcodes() {
    108         foreach( (array) $this->codes as $code => $function ) {
     108        foreach ( (array) $this->codes as $code => $function ) {
    109109            add_shortcode( $code, $function );
    110110        }
  • trunk/includes/common/template-tags.php

    r4995 r5002  
    22852285
    22862286            // Loop through parents
    2287             foreach( (array) $ancestors as $parent_id ) {
     2287            foreach ( (array) $ancestors as $parent_id ) {
    22882288
    22892289                // Parents
  • trunk/includes/core/capabilities.php

    r4995 r5002  
    275275
    276276    // Loop through available roles and add caps
    277     foreach( bbp_get_wp_roles()->role_objects as $role ) {
     277    foreach ( bbp_get_wp_roles()->role_objects as $role ) {
    278278        foreach ( bbp_get_caps_for_role( $role->name ) as $cap => $value ) {
    279279            $role->add_cap( $cap, $value );
     
    292292
    293293    // Loop through available roles and remove caps
    294     foreach( bbp_get_wp_roles()->role_objects as $role ) {
     294    foreach ( bbp_get_wp_roles()->role_objects as $role ) {
    295295        foreach ( array_keys( bbp_get_caps_for_role( $role->name ) ) as $cap ) {
    296296            $role->remove_cap( $cap );
     
    332332    $wp_roles = bbp_get_wp_roles();
    333333
    334     foreach( bbp_get_dynamic_roles() as $role_id => $details ) {
     334    foreach ( bbp_get_dynamic_roles() as $role_id => $details ) {
    335335        $wp_roles->roles[$role_id]        = $details;
    336336        $wp_roles->role_objects[$role_id] = new WP_Role( $role_id, $details['capabilities'] );
     
    382382 */
    383383function _bbp_reinit_dynamic_roles( $roles = array() ) {
    384     foreach( bbp_get_dynamic_roles() as $role_id => $details ) {
     384    foreach ( bbp_get_dynamic_roles() as $role_id => $details ) {
    385385        $roles[$role_id] = $details;
    386386    }
  • trunk/includes/core/functions.php

    r4998 r5002  
    334334
    335335    // Loop through usernames and link to profiles
    336     foreach( (array) $usernames as $username ) {
     336    foreach ( (array) $usernames as $username ) {
    337337
    338338        // Skip if username does not exist or user is not active
  • trunk/includes/core/template-functions.php

    r4995 r5002  
    186186    // Loop through 'bbp_template_stack' filters, and call callback functions
    187187    do {
    188         foreach( (array) current( $wp_filter[$tag] ) as $the_ ) {
     188        foreach ( (array) current( $wp_filter[$tag] ) as $the_ ) {
    189189            if ( ! is_null( $the_['function'] ) ) {
    190190                $args[1] = $stack;
  • trunk/includes/extend/akismet.php

    r4995 r5002  
    6565        // Add the checks
    6666        foreach ( $checks as $type => $functions )
    67             foreach( $functions as $function => $priority )
     67            foreach ( $functions as $function => $priority )
    6868                add_filter( $function, array( $this, $type . '_post'  ), $priority );
    6969
  • trunk/includes/extend/buddypress/functions.php

    r4995 r5002  
    432432
    433433    // Loop through forums and remove this group from each one
    434     foreach( (array) $forum_ids as $forum_id ) {
     434    foreach ( (array) $forum_ids as $forum_id ) {
    435435        bbp_remove_group_id_from_forum( $group_id, $forum_id );
    436436    }
     
    450450
    451451    // Loop through groups and remove this forum from each one
    452     foreach( (array) $group_ids as $group_id ) {
     452    foreach ( (array) $group_ids as $group_id ) {
    453453        bbp_remove_forum_id_from_group( $forum_id, $group_id );
    454454    }
  • trunk/includes/forums/template-tags.php

    r4995 r5002  
    21422142        $type_output = '<select name="bbp_forum_type" id="bbp_forum_type_select">' . "\n";
    21432143
    2144         foreach( $forum_attr as $value => $label )
     2144        foreach ( $forum_attr as $value => $label )
    21452145            $type_output .= "\t" . '<option value="' . esc_attr( $value ) . '"' . selected( bbp_get_forum_type( $forum_id ), $value, false ) . '>' . esc_html( $label ) . '</option>' . "\n";
    21462146
     
    21802180        $status_output = '<select name="bbp_forum_status" id="bbp_forum_status_select">' . "\n";
    21812181
    2182         foreach( $forum_attr as $value => $label )
     2182        foreach ( $forum_attr as $value => $label )
    21832183            $status_output .= "\t" . '<option value="' . esc_attr( $value ) . '"' . selected( bbp_get_forum_status( $forum_id ), $value, false ) . '>' . esc_html( $label ) . '</option>' . "\n";
    21842184
     
    22192219        $visibility_output = '<select name="bbp_forum_visibility" id="bbp_forum_visibility_select">' . "\n";
    22202220
    2221         foreach( $forum_attr as $value => $label )
     2221        foreach ( $forum_attr as $value => $label )
    22222222            $visibility_output .= "\t" . '<option value="' . esc_attr( $value ) . '"' . selected( bbp_get_forum_visibility( $forum_id ), $value, false ) . '>' . esc_html( $label ) . '</option>' . "\n";
    22232223
  • trunk/includes/replies/functions.php

    r4995 r5002  
    777777
    778778        // Update all anonymous metas
    779         foreach( $r as $anon_key => $anon_value ) {
     779        foreach ( $r as $anon_key => $anon_value ) {
    780780            update_post_meta( $reply_id, '_' . $anon_key, (string) $anon_value, false );
    781781        }
  • trunk/includes/topics/functions.php

    r4995 r5002  
    804804
    805805        // Update all anonymous metas
    806         foreach( $r as $anon_key => $anon_value ) {
     806        foreach ( $r as $anon_key => $anon_value ) {
    807807            update_post_meta( $topic_id, '_' . $anon_key, (string) $anon_value, false );
    808808        }
     
    27912791
    27922792        // Loop through and collect term names
    2793         foreach( $terms as $term ) {
     2793        foreach ( $terms as $term ) {
    27942794            $term_names[] = $term->name;
    27952795        }
     
    32773277    $topic_tags = array_filter( (array) get_the_terms( $topic_id, bbp_get_topic_tag_tax_id() ) );
    32783278    $terms      = array();
    3279     foreach( $topic_tags as $term ) {
     3279    foreach ( $topic_tags as $term ) {
    32803280        $terms[] = $term->name;
    32813281    }
  • trunk/includes/topics/template-tags.php

    r4995 r5002  
    35343534
    35353535                    // Loop through them
    3536                     foreach( $terms as $term ) {
     3536                    foreach ( $terms as $term ) {
    35373537                        $new_terms[] = $term->name;
    35383538                    }
Note: See TracChangeset for help on using the changeset viewer.