WordPress.org

Make WordPress Core

Changeset 38574


Ignore:
Timestamp:
09/08/2016 05:30:32 AM (21 months ago)
Author:
peterwilsoncc
Message:

Menus: Improve documentation of new $item_spacing argument.

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.

Location:
trunk/src/wp-includes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/nav-menu-template.php

    r38559 r38574  
    1515 *
    1616 * @since 3.0.0
     17 * @since 4.7.0 Added the `item_spacing` argument.
    1718 *
    1819 * @staticvar array $menu_id_slugs
     
    4142 *     @type string             $items_wrap      How the list items should be wrapped. Default is a ul with an id and class.
    4243 *                                               Uses printf() format with numbered placeholders.
    43  *     @type string             $item_spacing    Whether whitespace format the menu's HTML: 'discard' or 'preserve' (default).
     44 *     @type string             $item_spacing    Whether to preserve whitespace within the menu's HTML. Accepts 'preserve' or 'discard'. Default 'preserve'.
    4445 * }
    4546 * @return object|false|void Menu output if $echo is false, false if there are no items or no menu was found.
  • trunk/src/wp-includes/post-template.php

    r38523 r38574  
    11101110 *
    11111111 * @since 1.5.0
     1112 * @since 4.7.0 Added the `item_spacing` argument.
    11121113 *
    11131114 * @see get_pages()
     
    11391140 *     @type string $title_li     List heading. Passing a null or empty value will result in no heading, and the list
    11401141 *                                will not be wrapped with unordered list `<ul>` tags. Default 'Pages'.
    1141  *     @type string $item_spacing Whether whitespace format the menu's HTML: 'discard' or 'preserve' (default).
     1142 *     @type string $item_spacing Whether to preserve whitespace within the menu's HTML. Accepts 'preserve' or 'discard'. Default 'preserve'.
    11421143 *     @type Walker $walker       Walker instance to use for listing pages. Default empty (Walker_Page).
    11431144 * }
     
    12331234 * @since 2.7.0
    12341235 * @since 4.4.0 Added `menu_id`, `container`, `before`, `after`, and `walker` arguments.
     1236 * @since 4.7.0 Added the `item_spacing` argument.
    12351237 *
    12361238 * @param array|string $args {
     
    12501252 *     @type string          $before       The HTML or text to prepend to the menu. Default is '<ul>'.
    12511253 *     @type string          $after        The HTML or text to append to the menu. Default is '</ul>'.
    1252  *     @type string          $item_spacing Whether whitespace format the menu's HTML: 'discard' or 'preserve' (default).
     1254 *     @type string          $item_spacing Whether to preserve whitespace within the menu's HTML. Accepts 'preserve' or 'discard'. Default 'discard'.
    12531255 *     @type Walker          $walker       Walker instance to use for listing pages. Default empty (Walker_Page).
    12541256 * }
Note: See TracChangeset for help on using the changeset viewer.