[wp-trac] [WordPress Trac] #52348: Docs: inconsistency in `wp_tag_cloud` DocBlock concerning `$number` default value

WordPress Trac noreply at wordpress.org
Fri Jan 22 23:22:25 UTC 2021


#52348: Docs: inconsistency in `wp_tag_cloud` DocBlock concerning `$number` default
value
--------------------------+-------------------------
 Reporter:  audrasjb      |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  5.7
Component:  General       |    Version:
 Severity:  normal        |   Keywords:  needs-patch
  Focuses:  docs          |
--------------------------+-------------------------
 In `wp_tag_cloud()`, we have the following documentation:
 {{{
  *     @type int    $number    The number of tags to display. Accepts any
 positive integer
  *                             or zero to return all. Default 0 (all
 tags).
 }}}

 But here are the default values for `$args`:
 {{{
         $defaults = array(
                 'smallest'   => 8,
                 'largest'    => 22,
                 'unit'       => 'pt',
                 'number'     => 45,
                 'format'     => 'flat',
                 'separator'  => "\n",
                 'orderby'    => 'name',
                 'order'      => 'ASC',
                 'exclude'    => '',
                 'include'    => '',
                 'link'       => 'view',
                 'taxonomy'   => 'post_tag',
                 'post_type'  => '',
                 'echo'       => true,
                 'show_count' => 0,
         );
 }}}

 We should update the DocBlock accordingly to the real default value.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/52348>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list