?AlkantarClanX12

Your IP : 216.73.217.134


Current Path : /home/rankinh/lynkandco/wp-content/plugins/nexteuv-plus/modules/site-to-top/customizer/
Upload File :
Current File : /home/rankinh/lynkandco/wp-content/plugins/nexteuv-plus/modules/site-to-top/customizer/index.php

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

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

        private static $_instance = null;

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

            return self::$_instance;
        }

        function __construct() {

            add_filter( 'nexteuv_plus_customizer_default', array( $this, 'default' ) );
            add_action( 'nexteuv_general_cutomizer_options', array( $this, 'register_general' ), 40 );
        }

        function default( $option ) {
            $option['show_site_to_top'] = '0';
            return $option;
        }

        function register_general( $wp_customize ) {

            $wp_customize->add_section(
                new NextEuv_Customize_Section(
                    $wp_customize,
                    'site-to-top-section',
                    array(
                        'title'    => esc_html__('To Top', 'nexteuv-plus'),
                        'panel'    => 'site-general-main-panel',
                        'priority' => 40,
                    )
                )
            );

                /**
                 * Option : Enable Site To Top
                 */
                $wp_customize->add_setting(
                    NEXTEUV_CUSTOMISER_VAL . '[show_site_to_top]', array(
                        'type' => 'option',
                    )
                );

                $wp_customize->add_control(
                    new NextEuv_Customize_Control_Switch(
                        $wp_customize, NEXTEUV_CUSTOMISER_VAL . '[show_site_to_top]', array(
                            'type'    => 'wdt-switch',
                            'section' => 'site-to-top-section',
                            'label'   => esc_html__( 'Enable To Top', 'nexteuv-plus' ),
                            'choices' => array(
                                'on'  => esc_attr__( 'Yes', 'nexteuv-plus' ),
                                'off' => esc_attr__( 'No', 'nexteuv-plus' )
                            )
                        )
                    )
                );
        }
    }
}

NextEuvPlusCustomizerSiteToTop::instance();