示例#1
0
function st_flex_js_settings()
{
    $settings = array('animation' => 'string', 'animationLoop' => 'bool', 'animationDuration' => 'int', 'slideshow' => 'bool', 'slideshowSpeed' => 'int', 'animationSpeed' => 'int', 'pauseOnAction' => 'bool', 'pauseOnHover' => 'bool', 'controlNav' => 'bool', 'randomize' => 'bool', 'directionNav' => 'bool');
    $js_options = array();
    foreach ($settings as $name => $type) {
        $v = st_get_setting('flex_' . $name, '');
        if (isset($v) && !empty($v)) {
            $js_options[$name] = st_data_type($v, $type);
        }
    }
    $js_options['nextText'] = '<i class="icon-chevron-right"></i>';
    $js_options['prevText'] = '<i class="icon-chevron-left"></i>';
    return $js_options;
}
示例#2
0
function st_flip_js_settings()
{
    $settings = array('directionnav' => 'bool', 'thumbnail' => 'bool');
    $js_options = array();
    foreach ($settings as $name => $type) {
        $v = st_get_setting('gflip_' . $name, '0');
        if (isset($v)) {
            $js_options[$name] = st_data_type($v, $type);
        }
    }
    return $js_options;
}