WordPress.org

Make WordPress Core

Changeset 39561


Ignore:
Timestamp:
12/10/2016 11:38:04 PM (18 months ago)
Author:
westonruter
Message:

Customize: Deprecate page_home nav menu item starter content in favor of home_link; replace usage in Twenty Seventeen.

Props celloexpressions, westonruter.
Amends [38991].
See #38615, #38114.
Fixes #39104.

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-content/themes/twentyseventeen/functions.php

    r39373 r39561  
    170170                'name' => __( 'Top Menu', 'twentyseventeen' ),
    171171                'items' => array(
    172                     'page_home',
     172                    'link_home',
    173173                    'page_about',
    174174                    'page_blog',
  • trunk/src/wp-includes/theme.php

    r39546 r39561  
    19661966        ),
    19671967        'nav_menus' => array(
    1968             'page_home' => array(
     1968            'link_home' => array(
     1969                'type' => 'custom',
     1970                'title' => _x( 'Home', 'Theme starter content' ),
     1971                'url' => home_url(),
     1972            ),
     1973            'page_home' => array( // Deprecated in favor of home_link.
    19691974                'type' => 'post_type',
    19701975                'object' => 'page',
  • trunk/tests/phpunit/tests/customize/manager.php

    r39560 r39561  
    351351                    'name'  => 'Menu Name',
    352352                    'items' => array(
    353                         'page_home',
     353                        'link_home',
    354354                        'page_about',
    355355                        'page_blog',
     
    479479
    480480        $this->assertEquals( -1, $changeset_values['nav_menu_locations[top]'] );
    481         $this->assertEquals( $posts_by_name['home'], $changeset_values['nav_menu_item[-1]']['object_id'] );
     481        $this->assertEquals( 0, $changeset_values['nav_menu_item[-1]']['object_id'] );
     482        $this->assertEquals( 'custom', $changeset_values['nav_menu_item[-1]']['type'] );
     483        $this->assertEquals( home_url(), $changeset_values['nav_menu_item[-1]']['url'] );
    482484
    483485        $this->assertEmpty( $wp_customize->changeset_data() );
Note: See TracChangeset for help on using the changeset viewer.