WordPress.org

Make WordPress Core


Ignore:
Timestamp:
01/30/2018 02:45:55 PM (3 years ago)
Author:
SergeyBiryukov
Message:

Customize: Include nav menu item for Home custom link in search results for "Home".

Props audrasjb, westonruter.
Merges [42611] to the 4.9 branch.
Fixes #42991.

Location:
branches/4.9
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/4.9

  • branches/4.9/tests/phpunit/tests/customize/nav-menus.php

    r41887 r42621  
    354354        $this->assertEquals( 2, count( $results ) );
    355355        remove_filter( 'customize_nav_menu_searched_items', array( $this, 'filter_search' ), 10 );
     356
     357        // Test home.
     358        $title   = _x( 'Home', 'nav menu home label' );
     359        $results = $menus->search_available_items_query(
     360            array(
     361                'pagenum' => 1,
     362                's'       => $title,
     363            )
     364        );
     365        $this->assertCount( 1, $results );
     366        $this->assertEquals( 'home', $results[0]['id'] );
     367        $this->assertEquals( 'custom', $results[0]['type'] );
    356368    }
    357369
Note: See TracChangeset for help on using the changeset viewer.