[wp-trac] [WordPress Trac] #51137: wp_terms_checklist not checking selected taxonomy items with selected_cats option

WordPress Trac noreply at wordpress.org
Tue Aug 25 15:46:56 UTC 2020


#51137: wp_terms_checklist not checking selected taxonomy items with selected_cats
option
--------------------------+-----------------------------------------
 Reporter:  brianhogg     |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  5.5.1
Component:  General       |     Version:  5.5
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |     Focuses:  template, coding-standards
--------------------------+-----------------------------------------
Changes (by TimothyBlynJacobs):

 * focuses:   => template, coding-standards
 * milestone:  Awaiting Review => 5.5.1


Comment:

 Thanks for the ticket @brianhogg!

 Introduce in [47557]. I agree, I think this is worth fixing precisely
 because these functions are used so often in contexts where the value will
 be a string. Both form elements, and also as the results of `get_option`
 or `get_metadata`.

 It looks like it also affects the following functions:

 - `wp_popular_terms_checklist`
 - `wp_link_category_checklist`
 - `Walker_Category_Checklist::start_el`

 Looking at some other places in Core, we might instead want to `array_map(
 'intval' )` instead of making it a loose comparison. For instance
 `WP_Http_Cookie::test`.

 Cc: @SergeyBiryukov.

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


More information about the wp-trac mailing list