customizer-library
customizer-library copied to clipboard
radio select options as images
I'm trying to figure out how to use images for my radio select options, like for instance when you are choosing layout options for a sidebar placement. Is this supported?
This might help: http://justintadlock.com/archives/2015/06/04/customizer-radio-image-control
@jamigibbs - well, maybe... phpstorm hates that JS template that's for sure.... it's a bit different from the existing and throwing me a bit here.... But basically it sounds like my answer is "no" and I need to figure this outside of the existing customizer library code, yes?
Right, the customizer library makes it easier to apply core customizer options but doesn't go too far with custom settings (rightfully so, I think). You'd want to add your own as needed. I was planning on integrating this at some point into a theme I'm working on so I'll take a look and swing back here to let you know if I was able to.
Thanks @jamigibbs - very much appreciated. Unfortunately I spent way to long on it today with my other deadlines, so I just made 12 options as text. I just know my boss is going to say "why cant we have images" - lol
Ok. Well, if you still want some help with it, I can give some pointers. Justin has a nicer solution that I've managed to integrate:
https://gist.github.com/justintadlock/2a9e3312a6fe10e8dc28
@jamigibbs - are you planning to integrate back up here to this library by any chance?
I'm not sure that a pull request here is what Devin wants (to keep the library vanilla for other devs) so how about I just update my fork:
https://github.com/jamigibbs/customizer-library
Feel free to set yourself as watching so you get notified of changes and you're welcome to submit questions there if you'd like.
There you go:
https://github.com/jamigibbs/customizer-library/commit/825805cbf9fd1a32abefa6edc420716892272ae9
This is cool! I actually don't have too much of a problem adding additional controls if they are not too complex and will be used frequently.
The piece I might prefer to sheave off is the style-builder. Just thinking aloud...