[wp-trac] [WordPress Trac] #45928: Twenty Nineteen: Add a filter to the $primay_color variable

WordPress Trac noreply at wordpress.org
Wed Feb 13 19:22:00 UTC 2019


#45928: Twenty Nineteen: Add a filter to the $primay_color variable
-------------------------------------+---------------------
 Reporter:  allancole                |       Owner:  (none)
     Type:  enhancement              |      Status:  new
 Priority:  normal                   |   Milestone:  5.1.1
Component:  Bundled Theme            |     Version:
 Severity:  normal                   |  Resolution:
 Keywords:  has-patch needs-testing  |     Focuses:
-------------------------------------+---------------------

Comment (by laurelfulford):

 Thanks @allancole!

 I've tested [attachment:"45928.2.patch"] , and it seems to work well for
 filtering colours in child themes.

 One thing I notice is if you're moving from the default colour in the
 Customizer to a custom colour, the current patch will not preview -- it's
 throwing a JavaScript error on line 29 of customize-preview.js:

 `Uncaught TypeError: Cannot read property 'split' of undefined`

 The custom colour does work fine on the front-end, and if you're moving
 from one custom colour to another in the Customizer, it previews fine.

 This looks like it has to do with the conditional changes inside of
 `twentynineteen_colors_css_wrap()` -- with it, the inline CSS the
 JavaScript is looking for doesn't exist when you start with the default
 colour.

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


More information about the wp-trac mailing list