Changeset 34809 for trunk/src/wp-includes/taxonomy-functions.php
- Timestamp:
- 10/03/2015 08:24:09 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/taxonomy-functions.php
r34787 r34809 2517 2517 * unless a unique slug has been explicitly provided. 2518 2518 */ 2519 if ( $name_match = get_term_by( 'name', $name, $taxonomy ) ) { 2519 $name_matches = get_terms( $taxonomy, array( 2520 'name' => $name, 2521 'hide_empty' => false, 2522 ) ); 2523 2524 /* 2525 * The `name` match in `get_terms()` doesn't differentiate accented characters, 2526 * so we do a stricter comparison here. 2527 */ 2528 $name_match = null; 2529 if ( $name_matches ) { 2530 foreach ( $name_matches as $_match ) { 2531 if ( strtolower( $name ) === strtolower( $_match->name ) ) { 2532 $name_match = $_match; 2533 break; 2534 } 2535 } 2536 } 2537 2538 if ( $name_match ) { 2520 2539 $slug_match = get_term_by( 'slug', $slug, $taxonomy ); 2521 2540 if ( ! $slug_provided || $name_match->slug === $slug || $slug_match ) {
Note: See TracChangeset
for help on using the changeset viewer.