[wp-trac] [WordPress Trac] #45756: Fix parameter name typo in 'taxonomy_meta_box_sanitize_cb_checkboxes'

WordPress Trac noreply at wordpress.org
Fri Dec 28 16:35:19 UTC 2018


#45756: Fix parameter name typo in 'taxonomy_meta_box_sanitize_cb_checkboxes'
-------------------------------------------------+-------------------------
 Reporter:  itowhid06                            |       Owner:
                                                 |  SergeyBiryukov
     Type:  defect (bug)                         |      Status:  reviewing
 Priority:  normal                               |   Milestone:  5.1
Component:  Taxonomy                             |     Version:  5.0
 Severity:  normal                               |  Resolution:
 Keywords:  has-patch good-first-bug dev-        |     Focuses:
  feedback                                       |
-------------------------------------------------+-------------------------
Changes (by SergeyBiryukov):

 * owner:  (none) => SergeyBiryukov
 * status:  new => reviewing
 * milestone:  Awaiting Review => 5.1


Comment:

 Replying to [comment:1 mukesh27]:
 > Do not understood why function used 2 arguments as {{{ $taxonmy }}} is
 not used in function
 >
 > {{{#!php
 > <?php
 > function taxonomy_meta_box_sanitize_cb_checkboxes( $taxonmy, $terms ) {
 >     return array_map( 'intval', $terms );
 > }
 > }}}

 Both the `$taxonomy` and `$terms` arguments are passed to the callback in
 [source:trunk/src/wp-admin/includes/post.php?rev=44338&marks=396#L390
 edit_post()].

 Even though `taxonomy_meta_box_sanitize_cb_checkboxes()` does not use the
 `$taxonomy` argument, we cannot remove it as the function signature needs
 to remain compatible with `taxonomy_meta_box_sanitize_cb_input()`, which
 does use the argument. Other (custom) callbacks might use it as well.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/45756#comment:6>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list