Make WordPress Core

Changeset 48597


Ignore:
Timestamp:
07/24/2020 01:09:07 AM (5 years ago)
Author:
SergeyBiryukov
Message:

Docs: Improve documentation for wp_list_comments().

Note that passing div to the style parameter will result in no additional list markup.

Props liuhaibin, jeremyfelt, functionalrhyme.
Fixes #49181.

File:
1 edited

Legend:

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

    r48590 r48597  
    20252025 *     @type object   $walker            Instance of a Walker class to list comments. Default null.
    20262026 *     @type int      $max_depth         The maximum comments depth. Default empty.
    2027  *     @type string   $style             The style of list ordering. Default 'ul'. Accepts 'ul', 'ol'.
     2027 *     @type string   $style             The style of list ordering. Accepts 'ul', 'ol', or 'div'.
     2028 *                                       'div' will result in no additional list markup. Default 'ul'.
    20282029 *     @type callable $callback          Callback function to use. Default null.
    20292030 *     @type callable $end-callback      Callback function to use at the end. Default null.
    2030  *     @type string   $type              Type of comments to list.
    2031  *                                       Default 'all'. Accepts 'all', 'comment', 'pingback', 'trackback', 'pings'.
     2031 *     @type string   $type              Type of comments to list. Accepts 'all', 'comment',
     2032 *                                       'pingback', 'trackback', 'pings'. Default 'all'.
    20322033 *     @type int      $page              Page ID to list comments for. Default empty.
    20332034 *     @type int      $per_page          Number of comments to list per page. Default empty.
    20342035 *     @type int      $avatar_size       Height and width dimensions of the avatar size. Default 32.
    2035  *     @type bool     $reverse_top_level Ordering of the listed comments. If true, will display newest comments first.
     2036 *     @type bool     $reverse_top_level Ordering of the listed comments. If true, will display
     2037 *                                       newest comments first. Default null.
    20362038 *     @type bool     $reverse_children  Whether to reverse child comments in the list. Default null.
    2037  *     @type string   $format            How to format the comments list.
    2038  *                                       Default 'html5' if the theme supports it. Accepts 'html5', 'xhtml'.
     2039 *     @type string   $format            How to format the comments list. Accepts 'html5', 'xhtml'.
     2040 *                                       Default 'html5' if the theme supports it.
    20392041 *     @type bool     $short_ping        Whether to output short pings. Default false.
    20402042 *     @type bool     $echo              Whether to echo the output or return it. Default true.
Note: See TracChangeset for help on using the changeset viewer.