Changeset 11287 for trunk/src/bp-xprofile/bp-xprofile-filters.php
- Timestamp:
- 12/11/2016 04:16:02 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-xprofile/bp-xprofile-filters.php
r10740 r11287 350 350 } 351 351 352 if ( !strpos( $field_value, ',' )&& ( count( explode( ' ', $field_value ) ) > 5 ) ) {352 if ( strpos( $field_value, ',' ) === false && strpos( $field_value, ';' ) === false && ( count( explode( ' ', $field_value ) ) > 5 ) ) { 353 353 return $field_value; 354 354 } 355 355 356 $values = explode( ',', $field_value ); 357 358 if ( !empty( $values ) ) { 356 if ( strpos( $field_value, ',' ) !== false ) { 357 $list_type = 'comma'; 358 $values = explode( ',', $field_value ); // Comma-separated lists. 359 } else { 360 $list_type = 'semicolon'; 361 $values = explode( ';', $field_value ); // Semicolon-separated lists. 362 } 363 364 if ( ! empty( $values ) ) { 359 365 foreach ( (array) $values as $value ) { 360 366 $value = trim( $value ); … … 380 386 } 381 387 382 $values = implode( ', ', $new_values ); 388 if ( 'comma' === $list_type ) { 389 $values = implode( ', ', $new_values ); 390 } else { 391 $values = implode( '; ', $new_values ); 392 } 383 393 } 384 394
Note: See TracChangeset
for help on using the changeset viewer.