Make WordPress Core

Changeset 53318


Ignore:
Timestamp:
04/29/2022 07:27:00 PM (3 years ago)
Author:
johnbillion
Message:

Docs: Improve documentation of the walker argument for various functions.

See #54729

Location:
trunk/src
Files:
3 edited

Legend:

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

    r53220 r53318  
    6969 *     @type int[]  $popular_cats         Array of category IDs to receive the "popular-category" class.
    7070 *                                        Default false.
    71  *     @type Walker $walker               Walker object to use to build the output.
    72  *                                        Default is a Walker_Category_Checklist instance.
     71 *     @type Walker $walker               Walker object to use to build the output. Default empty which
     72 *                                        results in a Walker_Category_Checklist instance being used.
    7373 *     @type string $taxonomy             Taxonomy to generate the checklist for. Default 'category'.
    7474 *     @type bool   $checked_ontop        Whether to move checked items out of the hierarchy and to
  • trunk/src/wp-includes/category-template.php

    r52958 r53318  
    332332 *     @type bool         $required          Whether the `<select>` element should have the HTML5 'required' attribute.
    333333 *                                           Default false.
     334 *     @type Walker       $walker            Walker object to use to build the output. Default empty which results in a
     335 *                                           Walker_CategoryDropdown instance being used.
    334336 * }
    335337 * @return string HTML dropdown list of categories.
     
    519521 *     @type bool|int     $use_desc_for_title    Whether to use the category description as the title attribute.
    520522 *                                               Accepts 0, 1, or their bool equivalents. Default 1.
     523 *     @type Walker       $walker                Walker object to use to build the output. Default empty which results
     524 *                                               in a Walker_Category instance being used.
    521525 * }
    522526 * @return void|string|false Void if 'echo' argument is true, HTML list of categories if 'echo' is false.
  • trunk/src/wp-includes/post-template.php

    r52935 r53318  
    12601260 *     @type string       $item_spacing Whether to preserve whitespace within the menu's HTML. Accepts 'preserve' or 'discard'.
    12611261 *                                      Default 'preserve'.
    1262  *     @type Walker       $walker       Walker instance to use for listing pages. Default empty (Walker_Page).
     1262 *     @type Walker       $walker       Walker instance to use for listing pages. Default empty which results in a
     1263 *                                      Walker_Page instance being used.
    12631264 * }
    12641265 * @return void|string Void if 'echo' argument is true, HTML list of pages if 'echo' is false.
     
    13821383 *     @type string          $item_spacing Whether to preserve whitespace within the menu's HTML. Accepts 'preserve'
    13831384 *                                         or 'discard'. Default 'discard'.
    1384  *     @type Walker          $walker       Walker instance to use for listing pages. Default empty (Walker_Page).
     1385 *     @type Walker          $walker       Walker instance to use for listing pages. Default empty which results in a
     1386 *                                         Walker_Page instance being used.
    13851387 * }
    13861388 * @return void|string Void if 'echo' argument is true, HTML menu if 'echo' is false.
Note: See TracChangeset for help on using the changeset viewer.