Make WordPress Core


Ignore:
Timestamp:
03/27/2017 09:28:36 AM (8 years ago)
Author:
swissspidy
Message:

Customize: Trailingslash the home nav menu item URL in starter content.

This prevents an additional 301 redirect when clicking on the nav menu item, and it also prevents a scenario where the auth cookie may not be passed
and cause an authentication error when navigating in the customizer.

Props dlh, swissspidy.
Fixes #40112.

Merges [40300] to the 4.7 branch.

Location:
branches/4.7
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/4.7

  • branches/4.7/tests/phpunit/tests/customize/manager.php

    r40099 r40338  
    485485        $this->assertEquals( 0, $changeset_values['nav_menu_item[-1]']['object_id'] );
    486486        $this->assertEquals( 'custom', $changeset_values['nav_menu_item[-1]']['type'] );
    487         $this->assertEquals( home_url(), $changeset_values['nav_menu_item[-1]']['url'] );
     487        $this->assertEquals( home_url( '/' ), $changeset_values['nav_menu_item[-1]']['url'] );
    488488
    489489        $this->assertEmpty( $wp_customize->changeset_data() );
Note: See TracChangeset for help on using the changeset viewer.