Changeset 33131
- Timestamp:
- 07/08/2015 08:17:52 PM (9 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-customize-nav-menus.php
r33094 r33131 772 772 $args['can_partial_refresh'] = $can_partial_refresh; 773 773 774 $hashed_args = $args; 775 774 776 if ( ! $can_partial_refresh ) { 775 $ args['fallback_cb'] = '';776 $ args['walker'] = '';777 } 778 779 ksort( $ args );780 $ args['args_hash'] = $this->hash_nav_menu_args( $args );781 782 $this->preview_nav_menu_instance_args[ $this->preview_nav_menu_instance_number ] = $ args;777 $hashed_args['fallback_cb'] = ''; 778 $hashed_args['walker'] = ''; 779 } 780 781 ksort( $hashed_args ); 782 $hashed_args['args_hash'] = $this->hash_nav_menu_args( $hashed_args ); 783 784 $this->preview_nav_menu_instance_args[ $this->preview_nav_menu_instance_number ] = $hashed_args; 783 785 return $args; 784 786 } -
trunk/tests/phpunit/tests/customize/nav-menus.php
r33089 r33131 359 359 $expected = array( 360 360 'echo', 361 'args_hash',362 361 'can_partial_refresh', 363 362 'fallback_cb', … … 371 370 ) ); 372 371 $this->assertEqualSets( $expected, array_keys( $results ) ); 373 $this->assertEquals( '', $results['fallback_cb'] ); 374 $this->assertEquals( '', $results['walker'] ); 372 $this->assertEquals( 'wp_page_menu', $results['fallback_cb'] ); 375 373 $this->assertEquals( 0, $results['can_partial_refresh'] ); 374 375 $this->assertNotEmpty( $menus->preview_nav_menu_instance_args[ $results['instance_number'] ] ); 376 $preview_nav_menu_instance_args = $menus->preview_nav_menu_instance_args[ $results['instance_number'] ]; 377 $this->assertEquals( '', $preview_nav_menu_instance_args['fallback_cb'] ); 378 $this->assertEquals( '', $preview_nav_menu_instance_args['walker'] ); 379 $this->assertNotEmpty( $preview_nav_menu_instance_args['args_hash'] ); 376 380 } 377 381
Note: See TracChangeset
for help on using the changeset viewer.