/** * Main plugin Instance * * @static * @return object Main instance * * @since 1.0 * @author Antonino Scarfì <*****@*****.**> */ public static function instance() { if (is_null(self::$_instance)) { self::$_instance = new self(); } return self::$_instance; }
function yit_revslider_slider() { if ( ! class_exists('RevOperations') ) { return; } $operations = new RevOperations(); $arrValues = $operations->getGeneralSettingsValues(); $includesGlobally = UniteFunctionsRev::getVal($arrValues, "includes_globally","on"); $isWidgetActive = is_active_widget( false, false, "rev-slider-widget", true ); $hasShortcode = UniteFunctionsWPRev::hasShortcode("rev_slider"); if ( YIT_Layout()->slider_name===false || (YIT_Layout()->slider_name != 'none' && YIT_Slider::get_slider( YIT_Layout()->slider_name )->config->layout != 'revolution-slider') || $includesGlobally == "on" || $isWidgetActive || $hasShortcode ) { return; } if ( defined( 'RS_PLUGIN_URL' ) ) { wp_enqueue_style( 'rs-plugin-settings', RS_PLUGIN_URL . 'public/assets/css/settings.css', array(), RevSliderGlobals::SLIDER_REVISION ); } else { wp_enqueue_style( "rs-plugin-settings", UniteBaseClassRev::$url_plugin . "rs-plugin/css/settings.css", array(), GlobalsRevSlider::SLIDER_REVISION ); } $custom_css = RevOperations::getStaticCss(); $custom_css = UniteCssParserRev::compress_css($custom_css); wp_add_inline_style('rs-plugin-settings', $custom_css); $setBase = (is_ssl()) ? "https://" : "http://"; $url_jquery = $setBase . "ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js?app=revolution"; wp_enqueue_script("jquery", $url_jquery); // put javascript to footer add_action('wp_footer', array($GLOBALS['productFront'], 'putJavascript')); }
<?php /* * This file belongs to the YIT Framework. * * This source file is subject to the GNU GENERAL PUBLIC LICENSE (GPL 3.0) * that is bundled with this package in the file LICENSE.txt. * It is also available through the world-wide-web at this URL: * http://www.gnu.org/licenses/gpl-3.0.txt */ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly $sticky = ( yit_get_option('header-sticky') == 'yes' ) ? ' sticky-header' : ''; $skin = yit_get_option('header-skin'); $slider = YIT_Layout()->slider_name; $layout = ! in_array( $slider, array( false, '', 'none' ) ) && function_exists( 'YIT_Slider' ) ? YIT_Slider::get_slider( YIT_Layout()->slider_name )->config->layout : ''; // remove transparent skin if is not applicable if ( 'transparent' == $skin && ! in_array( $layout, array( 'parallax', 'revolution-slider' ) ) && 'yes' != YIT_Layout()->static_image && 'yes' != YIT_Layout()->parallax && '' == get_header_image() ) { $skin = 'skin1'; } if ( 'transparent' == $skin ) { $skin .= ' skin1'; if ( 'yes' == YIT_Layout()->enable_dark_header ) { $skin .= ' dark'; } } ?> <!-- START HEADER -->