Esempio n. 1
0
function layerslider_update_scripts()
{
    // Check new install
    layerslider_activation_scripts();
    if (has_action('layerslider_updated')) {
        do_action('layerslider_updated');
    }
}
Esempio n. 2
0
 if (!$data['status_layerslider']) {
     include $layerslider;
     $layerslider_last_version = get_option('avada_layerslider_last_version', '1.0');
     // Activate the plugin if necessary
     if (get_option('avada_layerslider_activated', '0') == '0') {
         // Run activation script
         layerslider_activation_scripts();
         // Save a flag that it is activated, so this won't run again
         update_option('avada_layerslider_activated', '1');
         // Save the current version number of LayerSlider
         update_option('avada_layerslider_last_version', $GLOBALS['lsPluginVersion']);
         // Do version check
     } else {
         if (version_compare($GLOBALS['lsPluginVersion'], $layerslider_last_version, '>')) {
             // Run again activation scripts for possible adjustments
             layerslider_activation_scripts();
             // Update the version number
             update_option('avada_layerslider_last_version', $GLOBALS['lsPluginVersion']);
         }
     }
 }
 /**************************/
 /* Include Flexslider WP */
 /**************************/
 $flexslider = get_template_directory() . '/framework/plugins/tf-flexslider/wooslider.php';
 if (!$data['status_flexslider']) {
     include $flexslider;
 }
 /**************************/
 /* Include Posts Type Order */
 /**************************/
Esempio n. 3
0
function avia_include_layerslider()
{
    if (!is_admin() && !post_has_layerslider()) {
        return;
    }
    // Path for LayerSlider WP main PHP file
    $layerslider = get_template_directory() . '/config-layerslider/LayerSlider/layerslider.php';
    $themeNice = avia_backend_safe_string(THEMENAME);
    // Check if the file is available and the user didnt activate the layerslide plugin to prevent warnings
    if (file_exists($layerslider)) {
        if (function_exists('layerslider')) {
            if (get_option("{$themeNice}_layerslider_activated", '0') == '0') {
                //import sample sliders
                avia_import_sample_slider();
                // Save a flag that it is activated, so this won't run again
                update_option("{$themeNice}_layerslider_activated", '1');
            }
        } else {
            // Include the file
            include $layerslider;
            $GLOBALS['lsPluginPath'] = get_template_directory_uri() . '/config-layerslider/LayerSlider/';
            $GLOBALS['lsAutoUpdateBox'] = false;
            // Activate the plugin if necessary
            if (get_option("{$themeNice}_layerslider_activated", '0') == '0') {
                // Run activation script
                layerslider_activation_scripts();
                //import sample sliders
                avia_import_sample_slider();
                // Save a flag that it is activated, so this won't run again
                update_option("{$themeNice}_layerslider_activated", '1');
            }
        }
    }
}
Esempio n. 4
0
 public function load_slider()
 {
     /**************************/
     /* Include LayerSlider WP */
     /**************************/
     // Path for LayerSlider WP main PHP file
     $layerslider = get_template_directory() . '/plugins/LayerSlider/layerslider.php';
     // Check if the file is available to prevent warnings
     if (file_exists($layerslider)) {
         // Include the file
         include $layerslider;
         // Activate the plugin if necessary  one time hit
         if (get_option('BH_layerslider_activated', '0') == '0') {
             // Run activation script
             layerslider_activation_scripts();
             // Save a flag that it is activated, so this won't run again
             update_option('BH_layerslider_activated', '1');
         }
     }
 }