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

WordPress Trac noreply at wordpress.org
Mon Dec 24 11:55:19 UTC 2018


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

 * keywords:  has-patch => has-patch good-first-bug dev-feedback
 * component:  General => Taxonomy


Comment:

 Nice cache @itowhid06.

 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 );
 }
 }}}

 If system not used {{{ $taxonmy }}} then need to remove first argument
 from the function like below.

 {{{#!php
 <?php
 function taxonomy_meta_box_sanitize_cb_checkboxes( $terms ) {
     return array_map( 'intval', $terms );
 }
 }}}

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


More information about the wp-trac mailing list