WordPress.org

Make WordPress Core

Changeset 37050


Ignore:
Timestamp:
03/22/2016 05:40:27 PM (6 years ago)
Author:
DrewAPicture
Message:

Docs: Improve inline documentation syntax for Walker_Comment.

  • Marks optional parameters as such
  • Improves existing parameter descriptions for clarity
  • Syntax improvements

See #36300.

File:
1 edited

Legend:

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

    r37049 r37050  
    5050     *
    5151     * @param string $output Passed by reference. Used to append additional content.
    52      * @param int $depth Depth of comment.
    53      * @param array $args Uses 'style' argument for type of HTML list.
     52     * @param int    $depth  Optional. Depth of the current comment. Default 0.
     53     * @param array  $args   Optional. Uses 'style' argument for type of HTML list. Default empty array.
    5454     */
    5555    public function start_lvl( &$output, $depth = 0, $args = array() ) {
     
    7979     *
    8080     * @param string $output Passed by reference. Used to append additional content.
    81      * @param int    $depth  Depth of comment.
    82      * @param array  $args   Will only append content if style argument value is 'ol' or 'ul'.
     81     * @param int    $depth  Optional. Depth of the current comment. Default 0.
     82     * @param array  $args   Optional. Will only append content if style argument value is 'ol' or 'ul'.
     83     *                       Default empty array.
    8384     */
    8485    public function end_lvl( &$output, $depth = 0, $args = array() ) {
     
    124125     *
    125126     * @param object $element           Data object.
    126      * @param array  $children_elements List of elements to continue traversing.
     127     * @param array  $children_elements List of elements to continue traversing. Passed by reference.
    127128     * @param int    $max_depth         Max depth to traverse.
    128      * @param int    $depth             Depth of current element.
     129     * @param int    $depth             Depth of the current element.
    129130     * @param array  $args              An array of arguments.
    130      * @param string $output            Passed by reference. Used to append additional content.
     131     * @param string $output            Used to append additional content. Passed by reference.
    131132     */
    132133    public function display_element( $element, &$children_elements, $max_depth, $depth, $args, &$output ) {
     
    140141
    141142        /*
    142          * If we're at the max depth, and the current element still has children,
    143          * loop over those and display them at this level. This is to prevent them
    144          * being orphaned to the end of the list.
     143         * If at the max depth, and the current element still has children, loop over those
     144         * and display them at this level. This is to prevent them being orphaned to the end
     145         * of the list.
    145146         */
    146147        if ( $max_depth <= $depth + 1 && isset( $children_elements[$id]) ) {
     
    164165     * @global WP_Comment $comment
    165166     *
    166      * @param string $output  Passed by reference. Used to append additional content.
     167     * @param string $output  Used to append additional content. Passed by reference.
    167168     * @param object $comment Comment data object.
    168      * @param int    $depth   Depth of comment in reference to parents.
    169      * @param array  $args    An array of arguments.
     169     * @param int    $depth   Optional. Depth of the current comment in reference to parents. Default 0.
     170     * @param array  $args    Optional. An array of arguments. Default empty array.
    170171     * @param int    $id      Optional. ID of the current comment. Default 0 (unused).
    171172     */
     
    206207     * @see wp_list_comments()
    207208     *
    208      * @param string     $output  Passed by reference. Used to append additional content.
    209      * @param WP_Comment $comment The comment object. Default current comment.
    210      * @param int        $depth   Depth of comment.
    211      * @param array      $args    An array of arguments.
     209     * @param string     $output  Used to append additional content. Passed by reference.
     210     * @param WP_Comment $comment The current comment object. Default current comment.
     211     * @param int        $depth   Optional. Depth of the current comment. Default 0.
     212     * @param array      $args    Optional. An array of arguments. Default empty array.
    212213     */
    213214    public function end_el( &$output, $comment, $depth = 0, $args = array() ) {
     
    233234     *
    234235     * @param WP_Comment $comment The comment object.
    235      * @param int        $depth   Depth of comment.
     236     * @param int        $depth   Depth of the current comment.
    236237     * @param array      $args    An array of arguments.
    237238     */
     
    255256     *
    256257     * @param object $comment Comment to display.
    257      * @param int    $depth   Depth of comment.
     258     * @param int    $depth   Depth of the current comment.
    258259     * @param array  $args    An array of arguments.
    259260     */
     
    314315     *
    315316     * @param object $comment Comment to display.
    316      * @param int    $depth   Depth of comment.
     317     * @param int    $depth   Depth of the current comment.
    317318     * @param array  $args    An array of arguments.
    318319     */
Note: See TracChangeset for help on using the changeset viewer.