示例#1
0
_e('Image is clickable', 'falite');
?>
"><?php 
_e('Image is clickable', 'falite');
?>
</label>                              
		                                
		                                <?php 
do_action('fa_extra_image_fields', $options);
?>
		                        	</div> 
	                            </div>
							</div>
						</div>
	                    <?php 
$plugin_options = FA_plugin_options();
if (1 == $plugin_options['auto_insert']) {
    ?>
	                    <!-- Automatic display options panel -->
	                    <div id="fa-autoplacement-options" class="postbox <?php 
    echo postbox_classes('fa-autoplacement-options', $page_hook);
    ?>
">
	                        <div title="<?php 
    _e('Click to toggle', 'falite');
    ?>
" class="handlediv"><br></div><h3 class="hndle"><span><?php 
    _e('Automatic placement Options', 'falite');
    ?>
</span></h3>
	                        <div class="inside">
示例#2
0
/**
 * Add JavaScript for sliders set to display automatically
 *
 */
function FA_add_scripts()
{
    $sliders = FA_display();
    if (!$sliders) {
        return;
    }
    $js_options = array();
    $js_options['loading_icon'] = FA_path('styles/loading.gif');
    foreach ($sliders as $slider_id) {
        // get the selected theme option for this slideshow
        $theme_option = FA_slider_options($slider_id, '_fa_lite_theme');
        /**
         * This is for backwards compatibility.
         * Prior to V2.4, theme Classic was actually 2 different themes: Light and Dark.
         * If slideshow was set on either dark or lite theme, those themes should no longer exist.
         * If user saved them, we'll use them. If not, switch to classic.
         */
        $load_classic = FA_should_load_classic($theme_option['active_theme']);
        if ($load_classic) {
            $theme_option = $load_classic;
        }
        // load the js starter if any
        $theme_path = FA_theme_path($theme_option['active_theme']);
        $theme_url = FA_theme_url($theme_option['active_theme']);
        // if for some reason theme doesn't exit, skip this slideshow
        if (!$theme_path) {
            continue;
            // skip slider if theme folder doesn't exist in configured themes folder
        }
        // get slideshow js options
        $options = FA_slider_options($slider_id, '_fa_lite_js');
        $options['protocol'] = is_ssl() ? 'https://' : 'http://';
        $plugin_options = FA_plugin_options();
        $options['no_credits'] = $plugin_options['disable_credits'];
        $options['img'] = FA_path('styles/images/fa_lite_ico.png');
        // add js options to slideshows options array. This will output in page.
        $js_options['FA_slider_' . $slider_id] = FA_lite_json($options);
        // check if theme has custom starter script
        if (is_file($theme_path . '/starter.js')) {
            $starter_handle = 'FA_starter-' . $theme_option['active_theme'];
            $starter_url = $theme_url . '/starter.js';
            wp_enqueue_script($starter_handle, $starter_url, array('FeaturedArticles-jQuery'));
        } else {
            // if starter isn't preset (older theme maybe), load the default starter
            wp_enqueue_script('FA_general_starter', FA_path('scripts/script-loader.js'), array('FeaturedArticles-jQuery'));
        }
    }
    wp_register_script('jquery-mousewheel', FA_path('scripts/jquery.mousewheel.min.js'), 'jquery', '3.0.6');
    wp_enqueue_script('FeaturedArticles-jQuery', FA_path('scripts/FeaturedArticles.jquery' . FA_DEV_PREFIX . '.js'), array('jquery', 'jquery-mousewheel'), '1.0');
    wp_localize_script('FeaturedArticles-jQuery', 'FA_Lite_params', $js_options);
}
示例#3
0
/**
 * Verifies if the plugin is allowed to display slideshows.
 * @return bool
 */
function fa_load_in_mobile()
{
    // by default, slideshows will be displayed into WP
    $display = true;
    // check if it's a mobile WPtouch theme
    if (fa_is_wptouch_mobile()) {
        // get option to display in mobile versions
        $options = FA_plugin_options();
        if (!$options['load_in_wptouch'] || fa_is_wptouch_exclusive()) {
            $display = false;
        }
    }
    return $display;
}