this is actually WordPress but I think it is more of PHP question.
I am using SMOF framework (it is for theme option setting) and flexslider. TO combine bothe of them, in one of flexslider option, I have to use whether "true" or "false". The thing is, SMOF returns "0" and "1" instead of "true" or "false" - the word. So I need to convert "0" to "false" and "1" to "true"
I have this code:
function isBoolean($slider_loop) {
$slider_loop = $smof_data['slider_loop'];
if ($slider_loop === "true") {
return true;
} else {
return false;
}
return $slider_loop;
}
..., and then in flexslider's "side":
animationLoop: "<?php echo isBoolean($slider_loop); ?>"
but it is not working.
Ideally, it should be something like this:
animationLoop: "<?php echo $smof_data['slider_loop']
// this return "0" and "1", while it should be "true" or "false" for flexslider to work ?>"
So, how should I do it?
Thanks in advance.