?AlkantarClanX12

Your IP : 216.73.217.134


Current Path : /home/rankinh/lynkandco/wp-content/plugins/nexteuv-pro/modules/cursor/
Upload File :
Current File : /home/rankinh/lynkandco/wp-content/plugins/nexteuv-pro/modules/cursor/index.php

<?php
if ( ! defined( 'ABSPATH' ) ) {
	exit; // Exit if accessed directly.
}

if( !class_exists( 'NextEuvProCursor' ) ) {
    class NextEuvProCursor {

        private static $_instance = null;

        private $enable_cursor_effect = false;
        private $cursor_type = 'type-1';
        private $cursor_link_hover_effect = '';
        private $cursor_lightbox_hover_effect = '';

        public static function instance() {
            if ( is_null( self::$_instance ) ) {
                self::$_instance = new self();
            }

            return self::$_instance;
        }

        function __construct() {
            $this->enable_cursor_effect = nexteuv_customizer_settings( 'enable_cursor_effect' );
            $this->cursor_type = nexteuv_customizer_settings( 'cursor_type' );
            $this->cursor_link_hover_effect = nexteuv_customizer_settings( 'cursor_link_hover_effect' );
            $this->cursor_lightbox_hover_effect = nexteuv_customizer_settings( 'cursor_lightbox_hover_effect' );
            $this->load_modules();
            $this->frontend();
        }

        function load_modules() {
            include_once NEXTEUV_PRO_DIR_PATH.'modules/cursor/customizer/index.php';
        }

        function frontend() {
            if($this->enable_cursor_effect) {
                add_action( 'nexteuv_after_main_css', array( $this, 'enqueue_assets' ) );
                add_action( 'nexteuv_hook_top', array( $this, 'load_template' ) );
            }
        }

        function enqueue_assets() {
            if($this->enable_cursor_effect) {
                wp_enqueue_style( 'nexteuv-cursor', NEXTEUV_PRO_DIR_URL . 'modules/cursor/assets/css/cursor.css', false, NEXTEUV_PRO_VERSION, 'all');
                wp_enqueue_script( 'nexteuv-cursor', NEXTEUV_PRO_DIR_URL . 'modules/cursor/assets/js/cursor.js', array('jquery'), NEXTEUV_PRO_VERSION, true );
                wp_localize_script('nexteuv-cursor', 'wdtCursorObjects', array (
                    'enableCursorEffect' => $this->enable_cursor_effect
                ));
            }
        }

        function load_template() {
            echo '<div class="wdt-cursor-wrapper '.esc_attr($this->cursor_type).' '.esc_attr($this->cursor_link_hover_effect).' '.esc_attr($this->cursor_lightbox_hover_effect).'">
                    <div class="wdt-cursor wdt-cursor-outer"></div>
                    <div class="wdt-cursor wdt-cursor-inner"></div>
                    <div class="wdt-cursor-section">				
                        <div class="wdt-cursor-main-class"></div>
                    </div>
                    <div class="wdt-cursor-pointer" id="wdt-cursor-pointer"></div>
                    <div class="wdt-cursor-pointer2" id="wdt-cursor-pointer2">					
                        <div class="wdt-cursor-progress-wrap">
                            <svg class="progress-circle svg-content" width="100%" height="100%" viewBox="-1 -1 102 102">
                                <path d="M50,1 a49,49 0 0,1 0,98 a49,49 0 0,1 0,-98"/>
                            </svg>
                        </div>
                    </div>
                    <div class="wdt-cursor-pointer3" id="wdt-cursor-pointer3"></div>
                </div>';
        }

    }
}

NextEuvProCursor::instance();