[wp-trac] [WordPress Trac] #24813: wp_add_inline_style behaviour changes with SCRIPT_DEBUG

WordPress Trac noreply at wordpress.org
Wed Oct 9 14:43:40 UTC 2013


#24813: wp_add_inline_style behaviour changes with SCRIPT_DEBUG
------------------------------+-----------------------------
 Reporter:  stephenharris     |       Owner:  SergeyBiryukov
     Type:  defect (bug)      |      Status:  closed
 Priority:  normal            |   Milestone:  3.7
Component:  General           |     Version:  3.3
 Severity:  normal            |  Resolution:  fixed
 Keywords:  has-patch commit  |
------------------------------+-----------------------------

Comment (by georgestephanis):

 New diff attached, this seems to fix all the issues and is fully backward
 compatible in my testing.  It probably could use some unit testing, but as
 this is fixing a regression, getting it in quickly would probably be good.

 I also added phpdoc, and removed the `return true` -- this way it will
 just return the style, which will evaluate to true.  It simplifies the
 code a bit, and more readable code is always a win.

 The only downside is that it will no longer concatenate multiple added
 inline styles into a single <style> element, but if we can't be sure about
 whether they've already been wrapped in <style> tags, that's no longer
 feasible anyways.

--
Ticket URL: <http://core.trac.wordpress.org/ticket/24813#comment:14>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list