From a30c4df4b5b408c5242b2edfc64d9e5fed1cdc9b Mon Sep 17 00:00:00 2001 From: Dion Hulse Date: Mon, 12 Dec 2016 02:25:35 +0000 Subject: [PATCH] Customize: Deprecate `page_home` nav menu item starter content in favor of `home_link`; replace usage in Twenty Seventeen. Props celloexpressions, westonruter. See #38615, #38114, [38991]. Merges [39561] to the 4.7 branch. Fixes #39104. Built from https://develop.svn.wordpress.org/branches/4.7@39575 git-svn-id: http://core.svn.wordpress.org/branches/4.7@39515 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-content/themes/twentyseventeen/functions.php | 2 +- wp-includes/theme.php | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/wp-content/themes/twentyseventeen/functions.php b/wp-content/themes/twentyseventeen/functions.php index 30fdfccb94..a41d317e4a 100644 --- a/wp-content/themes/twentyseventeen/functions.php +++ b/wp-content/themes/twentyseventeen/functions.php @@ -169,7 +169,7 @@ function twentyseventeen_setup() { 'top' => array( 'name' => __( 'Top Menu', 'twentyseventeen' ), 'items' => array( - 'page_home', + 'link_home', 'page_about', 'page_blog', 'page_contact', diff --git a/wp-includes/theme.php b/wp-includes/theme.php index db6016d7c3..da1cb12ce9 100644 --- a/wp-includes/theme.php +++ b/wp-includes/theme.php @@ -1965,7 +1965,12 @@ function get_theme_starter_content() { ) ), ), 'nav_menus' => array( - 'page_home' => array( + 'link_home' => array( + 'type' => 'custom', + 'title' => _x( 'Home', 'Theme starter content' ), + 'url' => home_url(), + ), + 'page_home' => array( // Deprecated in favor of home_link. 'type' => 'post_type', 'object' => 'page', 'object_id' => '{{home}}',