[wp-trac] [WordPress Trac] #57771: Editor: Fix `true` as the version when using wp_register_style().

WordPress Trac noreply at wordpress.org
Mon Feb 20 16:30:23 UTC 2023


#57771: Editor: Fix `true` as the version when using wp_register_style().
----------------------------+-------------------------
 Reporter:  hellofromTonya  |      Owner:  (none)
     Type:  defect (bug)    |     Status:  new
 Priority:  normal          |  Milestone:  6.2
Component:  Editor          |    Version:
 Severity:  normal          |   Keywords:  needs-patch
  Focuses:                  |
----------------------------+-------------------------
 In `wp-includes/script-loader.php` and `wp-includes/block-
 supports/duotone.php`, there are multiple instances registering a style
 via `wp_register_style()` where the version number is set to `true`.

 What's the problem?
 `true` is not a valid version number. Why? It's type juggled to a value of
 `1`. Therefore, the version never changes from release-to-release. Thus,
 there's no cache busting.

 What's the default value?
 The default value for the `$ver` parameter is `false`. When `false`, the
 version number is automatically generated to be the current installed
 WordPress version.

 This ticket proposes to review each instance in Core to determine what
 version number should be used and then fix each instance accordingly.

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


More information about the wp-trac mailing list