Changeset 6202
- Timestamp:
- 07/27/2012 02:54:30 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/1.5/bp-xprofile/bp-xprofile-filters.php
r6201 r6202 155 155 $values = explode( ',', $field_value ); 156 156 157 if ( $values) {158 foreach ( (array) $values as $value ) {157 if ( !empty( $values ) ) { 158 foreach ( (array) $values as $value ) { 159 159 $value = trim( $value ); 160 160 … … 162 162 if ( preg_match( '@(https?://([-\w\.]+)+(:\d+)?(/([\w/_\.]*(\?\S+)?)?)?)@', $value ) ) { 163 163 $new_values[] = make_clickable( $value ); 164 165 // Is not clickable 164 166 } else { 167 168 // More than 5 commas 165 169 if ( count( explode( ' ', $value ) ) > 5 ) { 166 $new_values[] = esc_html( $value ); 170 $new_values[] = $value; 171 172 // Less than 5 commas 167 173 } else { 168 $new_values[] = '<a href="' . site_url( bp_get_members_root_slug() ) . '/?s=' . esc_url( strip_tags( $value ) ) . '" rel="nofollow">' . esc_html( $value ) . '</a>'; 174 $search_url = add_query_arg( array( 's' => urlencode( $value ) ), bp_get_members_directory_permalink() ); 175 $new_values[] = '<a href="' . $search_url . '" rel="nofollow">' . esc_html( $value ) . '</a>'; 169 176 } 170 177 }
Note: See TracChangeset
for help on using the changeset viewer.