[wp-trac] [WordPress Trac] #49742: No longer able to enqueue multiple Google Fonts with wp_enqueue_style

WordPress Trac noreply at wordpress.org
Wed May 6 19:01:43 UTC 2020


#49742: No longer able to enqueue multiple Google Fonts with wp_enqueue_style
---------------------------+------------------------------
 Reporter:  tannerm        |       Owner:  (none)
     Type:  defect (bug)   |      Status:  new
 Priority:  normal         |   Milestone:  Awaiting Review
Component:  Script Loader  |     Version:
 Severity:  normal         |  Resolution:
 Keywords:                 |     Focuses:
---------------------------+------------------------------

Comment (by Otto42):

 Dangit, posted too early.

 There is, however, a concern about the method listed in the documentation
 (the proper_parse_str() example). Because we're using this to add and
 remove arguments, then the query string is converted to a PHP array, and
 then back into a string. This means that if we use a "proper" parse
 string, then converting it back will lose the multiple-usage information
 here.

 In other words, the naive way would do this:

 key=value1&key=value2

 becomes

 array( 'key' => array('value1', 'value2') )

 becomes

 key[]=value1&key[]=value2

 Which would be a problem.

 So, the information about how that multiple-key use exists needs to be
 stored somehow, so it can be reproduced properly.

 This is just something to keep in mind when making a patch, the
 proper_parse_str example in the PHP docs won't work for this use case.

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


More information about the wp-trac mailing list