image_select field not outputting the selector on header output
Notice something on this img select field
array(
'id' => 'body_bg_img',
'type' => 'image_select',
'tiles' => true,
'title' => __('Images Option (with pattern=>true)', 'cmk-framework'),
'subtitle' => __('Select a background pattern.', 'cmk-framework'),
'default' => 0,
'output' => array('#wrap'),
'compiler' => array('#wrap'),
'options' => array(1,2,3),//$sample_patterns,
),
header output result
background-image: url('3'); /** No selector **/
compiler result
#wrap{background-image: url('3');} /** working properly **/
Not a big issue for me as I am only using header output for testing purposes, Just feel to report it though
Cheers, Kenn
Your options are numbers, therefore, that is what is outputted.
lol. I only changed it in here so not getting long name ;)
its the css selector output is the problem not outputting on the header e.g. .my-css-selector { }
just to clarify here's the actual code
array(
'id' => 'body_bg_img',
'type' => 'image_select',
'tiles' => true,
'title' => __('Images Option (with pattern=>true)', 'cmk-framework'),
'subtitle' => __('Select a background pattern.', 'cmk-framework'),
'default' => 0,
'output' => array('#wrap'),
'compiler' => array('#wrap'),
'options' => $sample_patterns,
),
header output
background-image: url('http://localhost/wp/gantry/wp-content/themes/cmk/config/framework/cmk-options/patterns/pattern3.png'); /** No selector **/
Compiler Output
#wrap{background-image: url(''http://localhost/wp/gantry/wp-content/themes/cmk/config/framework/cmk-options/patterns/pattern3.png');}/** working properly **/
Hope you get my point.
Thanks
I see the problem. Missing variable in the code. I'll push a fix in a few minutes. :)
Done. I didn't change the version number, but the code has been updated. :)
Thank you so much,
As always, Redux support is excellent.
Happy Coding.. :+1:
Cheers, Kenn