Can wp.customize() receive multiple values for the first parameter?

Question

I am trying to find a way to add multiple values for the first parameter of wp.customize. Here’s my function:

  wp.customize('_themename_accent_colour', (value) => {
    value.bind( (to) => {
      let inline_css = ``;
      let inline_css_obj = _themename['inline-css'];
      for(let selector in inline_css_obj) {
        inline_css += `${selector} {`;
        for(let prop in inline_css_obj[selector]) {
          let val = inline_css_obj[selector][prop];
          inline_css += `${prop}: ${wp.customize(val).get()}`;
        }
        inline_css += `}`;
      }
      $('#_themename-styles-inline-css').html(inline_css);
    })
  })

I have been trying to find a way to add multiple values to the first parameter(‘_themename_accent_colour’) without success though. When I say multiple values I mean something like this:

wp.customize('_themename_accent_colour, _themename_accent_colour', (value) => {

Any help would be appreciated.

0
Madeirense 2 months 0 Answers 9 views 0

Leave an answer