[wp-trac] [WordPress Trac] #60640: Use of "selected" function for "Week Starts On" on General Setting page

WordPress Trac noreply at wordpress.org
Mon Feb 26 17:29:13 UTC 2024


#60640: Use of "selected" function for "Week Starts On" on General Setting page
-------------------------------+-----------------------------
 Reporter:  bhargavbhandari90  |       Owner:  (none)
     Type:  enhancement        |      Status:  new
 Priority:  normal             |   Milestone:  Future Release
Component:  Administration     |     Version:  trunk
 Severity:  minor              |  Resolution:
 Keywords:  has-patch          |     Focuses:
-------------------------------+-----------------------------
Changes (by swissspidy):

 * keywords:   => has-patch
 * milestone:  Awaiting Review => Future Release


Comment:

 Note that `selected()` does a strict comparison (`===`) whereas the
 existing code does a loose comparison (`==`). This would need to use
 `(int) get_option( 'start_of_week' )` to be safe.

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


More information about the wp-trac mailing list