Skip to:
Content

BuddyPress.org

Ticket #6605: 6605-03.patch

File 6605-03.patch, 1.1 KB (added by hnla, 10 years ago)

Remove the checked function fix - label & 'for' attr addition only.

  • src/bp-groups/bp-groups-template.php

     
    49534953                        $invites = groups_get_invites_for_group( $r['user_id'], $r['group_id'] );
    49544954
    49554955                        for ( $i = 0, $count = count( $friends ); $i < $count; ++$i ) {
     4956
    49564957                                $checked = in_array( (int) $friends[ $i ]['id'], (array) $invites );
    4957                                 $items[] = '<' . $r['separator'] . '><input' . checked( $checked ) . ' type="checkbox" name="friends[]" id="f-' . esc_attr( $friends[ $i ]['id'] ) . '" value="' . esc_attr( $friends[ $i ]['id'] ) . '" /> ' . esc_html( $friends[ $i ]['full_name'] ) . '</' . $r['separator'] . '>';
     4958
     4959                                $items[] = '<' . $r['separator'] . '><label for="f-' . esc_attr( $friends[ $i ]['id'] ) . '"><input' . checked( $checked ) . ' type="checkbox" name="friends[]" id="f-' . esc_attr( $friends[ $i ]['id'] ) . '" value="' . esc_attr( $friends[ $i ]['id'] ) . '" /> ' . esc_html( $friends[ $i ]['full_name'] ) . '</label></' . $r['separator'] . '>';
    49584960                        }
    49594961                }
    49604962