From 3cc19c17f383e33663c9b64bf12b1e7842de1406 Mon Sep 17 00:00:00 2001 From: Peter Wilson Date: Thu, 8 Sep 2016 05:30:32 +0000 Subject: [PATCH] Menus: Improve documentation of new `$item_spacing` argument. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adds `@since` tags for and improves description of the new `$item_spacing` argument added to `wp_nav_menu()`, `wp_list_pages()`, and `wp_page_menu()` in [38523]. Props johnbillion for copy. See #35206. git-svn-id: https://develop.svn.wordpress.org/trunk@38574 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/nav-menu-template.php | 3 ++- src/wp-includes/post-template.php | 6 ++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/wp-includes/nav-menu-template.php b/src/wp-includes/nav-menu-template.php index ba49918b73..e2c26411c8 100644 --- a/src/wp-includes/nav-menu-template.php +++ b/src/wp-includes/nav-menu-template.php @@ -14,6 +14,7 @@ require_once ABSPATH . WPINC . '/class-walker-nav-menu.php'; * Displays a navigation menu. * * @since 3.0.0 + * @since 4.7.0 Added the `item_spacing` argument. * * @staticvar array $menu_id_slugs * @@ -40,7 +41,7 @@ require_once ABSPATH . WPINC . '/class-walker-nav-menu.php'; * in order to be selectable by the user. * @type string $items_wrap How the list items should be wrapped. Default is a ul with an id and class. * Uses printf() format with numbered placeholders. - * @type string $item_spacing Whether whitespace format the menu's HTML: 'discard' or 'preserve' (default). + * @type string $item_spacing Whether to preserve whitespace within the menu's HTML. Accepts 'preserve' or 'discard'. Default 'preserve'. * } * @return object|false|void Menu output if $echo is false, false if there are no items or no menu was found. */ diff --git a/src/wp-includes/post-template.php b/src/wp-includes/post-template.php index 64732d910b..d915317722 100644 --- a/src/wp-includes/post-template.php +++ b/src/wp-includes/post-template.php @@ -1109,6 +1109,7 @@ function wp_dropdown_pages( $args = '' ) { * Retrieve or display list of pages in list (li) format. * * @since 1.5.0 + * @since 4.7.0 Added the `item_spacing` argument. * * @see get_pages() * @@ -1138,7 +1139,7 @@ function wp_dropdown_pages( $args = '' ) { * 'menu_order', 'post_parent', 'ID', 'rand', or 'comment_count'. Default 'post_title'. * @type string $title_li List heading. Passing a null or empty value will result in no heading, and the list * will not be wrapped with unordered list `