[wp-trac] [WordPress Trac] #56806: Docs: Incorrect parameter name in `deleted_{$meta_type}meta` filter docblock.

WordPress Trac noreply at wordpress.org
Tue Oct 11 21:37:11 UTC 2022


#56806: Docs: Incorrect parameter name in `deleted_{$meta_type}meta` filter
docblock.
--------------------------------+----------------------------------------
 Reporter:  costdev             |      Owner:  (none)
     Type:  defect (bug)        |     Status:  new
 Priority:  normal              |  Milestone:  Future Release
Component:  Options, Meta APIs  |    Version:  4.4
 Severity:  normal              |   Keywords:  needs-patch good-first-bug
  Focuses:  docs                |
--------------------------------+----------------------------------------
 A good first bug for new contributors to get comfortable with contributing
 to Core.

 In `src/wp-includes/meta.php`, at around
 [https://core.trac.wordpress.org/browser/tags/6.0.2/src/wp-
 includes/meta.php#L1081 line 1081], the `deleted_{$meta_type}meta`
 filter's docblock shows:

 {{{#!php
 * @param int $meta_ids Deleted metadata entry ID.
 }}}

 However, the parameter is actually called `$meta_id`:

 {{{#!php
 do_action( "deleted_{$meta_type}meta", $meta_id );
 }}}

 The parameter name should be changed from `$meta_ids` to `$meta_id` in the
 docblock.

 Introduced in [35718].

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


More information about the wp-trac mailing list