Changeset 44167
- Timestamp:
- 12/14/2018 05:15:54 AM (6 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
/branches/5.0 merged: 43899
- Property svn:mergeinfo changed
-
trunk/.travis.yml
r43975 r44167 13 13 matrix: 14 14 include: 15 - php: 7.316 15 - php: 7.2 17 16 env: WP_TRAVISCI=travis:format 18 17 - php: 7.1 19 18 env: WP_TRAVISCI=travis:js 19 - php: 7.3 20 20 - php: 7.2 21 21 - php: 7.1 … … 35 35 allow_failures: 36 36 - php: nightly 37 - php: 7.338 37 before_install: 39 38 - | -
trunk/src/wp-includes/nav-menu.php
r43571 r44167 1187 1187 1188 1188 // ...actually match! 1189 if ( false === stripos( $new_location, $slug ) && false === stripos( $slug, $new_location ) ) { 1189 if ( is_string( $new_location ) && false === stripos( $new_location, $slug ) && false === stripos( $slug, $new_location ) ) { 1190 continue; 1191 } elseif ( is_numeric( $new_location ) && $new_location !== $slug ) { 1190 1192 continue; 1191 1193 } … … 1198 1200 1199 1201 // ... have a match as well. 1200 if ( false === stripos( $location, $slug ) && false === stripos( $slug, $location ) ) { 1202 if ( is_string( $location ) && false === stripos( $location, $slug ) && false === stripos( $slug, $location ) ) { 1203 continue; 1204 } elseif ( is_numeric( $location ) && $location !== $slug ) { 1201 1205 continue; 1202 1206 } -
trunk/tests/phpunit/tests/menu/nav-menu.php
r42636 r44167 201 201 $this->assertEqualSets( $expected_nav_menu_locations, $new_next_theme_nav_menu_locations ); 202 202 } 203 204 /** 205 * Technically possible old nav menu locations were registered numerically. 206 * 207 * @covers wp_map_nav_menu_locations() 208 */ 209 public function test_numerical_old_locations() { 210 $this->register_nav_menu_locations( array( 'primary', 1 ) ); 211 212 $old_nav_menu_locations = array( 213 'primary' => 1, 214 'tertiary' => 2, 215 0 => 3, 216 ); 217 218 $next_theme_nav_menu_locations = array(); 219 $new_next_theme_nav_menu_locations = wp_map_nav_menu_locations( $next_theme_nav_menu_locations, $old_nav_menu_locations ); 220 221 $expected_nav_menu_locations = array( 222 'primary' => 1, 223 0 => 3, 224 ); 225 226 $this->assertEqualSets( $expected_nav_menu_locations, $new_next_theme_nav_menu_locations ); 227 } 203 228 }
Note: See TracChangeset
for help on using the changeset viewer.