Custom controls in customizer
-
Hey guys, I need some help.
I have a custom control in customizer which returns a json, something like this:
[{"icon_value":"fa-cogs","text":"Lorem ipsum dolor sit amet","title":"Translate","id":"llorix-one-lite_341241kq"}]
So, when I modify it I get something like this in Languages: https://prntscr.com/csxauc .
Is there any way to unregister this string and register its components?
Something like:pll_unregister('ugly_json_string'); $decoded_json = json_decode($ugly_json_string,true); foreach($decoded_json as $item){ pll_register_string($item['icon_value']); pll_register_string($item['text']); pll_register_string($item['title']); }
Thanks!
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Custom controls in customizer’ is closed to new replies.