[wp-trac] [WordPress Trac] #47810: Incorrect PHPDoc for hooks quick_edit_custom_box and bulk_edit_custom_box

WordPress Trac noreply at wordpress.org
Wed Jul 31 14:04:29 UTC 2019


#47810: Incorrect PHPDoc for hooks quick_edit_custom_box and bulk_edit_custom_box
-----------------------------+-----------------------------
 Reporter:  abrain           |      Owner:  (none)
     Type:  defect (bug)     |     Status:  new
 Priority:  normal           |  Milestone:  Awaiting Review
Component:  Quick/Bulk Edit  |    Version:  trunk
 Severity:  minor            |   Keywords:
  Focuses:  docs             |
-----------------------------+-----------------------------
 The PHPDoc for the hook
 [https://developer.wordpress.org/reference/hooks/quick_edit_custom_box/
 quick_edit_custom_box] is missing the `$` in front of the parameter
 `taxonomy`. This causes the Code Reference page to omit the parameter
 name.
 {{{
 /**
  * Fires once for each column in Quick Edit mode.
  *
  * @since 2.7.0
  *
  * @param string $column_name Name of the column to edit.
  * @param string $post_type   The post type slug, or current screen name
 if this is a taxonomy list table.
  * @param string taxonomy     The taxonomy name, if any.
  */
 }}}


 A few lines further up, the PHPDoc for the hook
 [https://developer.wordpress.org/reference/hooks/bulk_edit_custom_box/
 bulk_edit_custom_box] states that the parameter `$post_type` is of type
 `WP_Post`.
 {{{
 /**
  * Fires once for each column in Bulk Edit mode.
  *
  * @since 2.7.0
  *
  * @param string  $column_name Name of the column to edit.
  * @param WP_Post $post_type   The post type slug.
  */
 }}}

 As this parameter is filled with `WP_Screen`'s `$post_type` property which
 is a `string`, it should also be documented as a `string`.

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


More information about the wp-trac mailing list