Sindbad~EG File Manager

Current Path : /home/x/i/e/xiedrke/malino/wp-content/plugins/trendz-plus/modules/site-loader/customizer/
Upload File :
Current File : /home/x/i/e/xiedrke/malino/wp-content/plugins/trendz-plus/modules/site-loader/customizer/index.php

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

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

        private static $_instance = null;

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

            return self::$_instance;
        }

        function __construct() {
            add_filter( 'trendz_plus_customizer_default', array( $this, 'default' ) );
            add_action( 'trendz_general_cutomizer_options', array( $this, 'register_general' ), 30 );
        }

        function default( $option ) {

            $option['show_site_loader'] = '1';
            $option['site_loader']      = '';
            $option['site_loader_image'] = '';

            return $option;
        }

        function register_general( $wp_customize ) {

            $wp_customize->add_section(
                new Trendz_Customize_Section(
                    $wp_customize,
                    'site-loader-section',
                    array(
                        'title'    => esc_html__('Loader', 'trendz-plus'),
                        'panel'    => 'site-general-main-panel',
                        'priority' => 30,
                    )
                )
            );

                /**
                 * Option : Enable Site Loader
                 */
                $wp_customize->add_setting(
                    TRENDZ_CUSTOMISER_VAL . '[show_site_loader]', array(
                        'type' => 'option',
                    )
                );

                $wp_customize->add_control(
                    new Trendz_Customize_Control_Switch(
                        $wp_customize, TRENDZ_CUSTOMISER_VAL . '[show_site_loader]', array(
                            'type'    => 'wdt-switch',
                            'section' => 'site-loader-section',
                            'label'   => esc_html__( 'Enable Loader', 'trendz-plus' ),
                            'choices' => array(
                                'on'  => esc_attr__( 'Yes', 'trendz-plus' ),
                                'off' => esc_attr__( 'No', 'trendz-plus' )
                            )
                        )
                    )
                );

                /**
                 * Option :Site Loader
                 */
                $wp_customize->add_setting(
                    TRENDZ_CUSTOMISER_VAL . '[site_loader]', array(
                        'type'    => 'option',
                    )
                );

                $wp_customize->add_control(
                    new Trendz_Customize_Control(
                        $wp_customize, TRENDZ_CUSTOMISER_VAL . '[site_loader]', array(
                            'type'       => 'select',
                            'section'    => 'site-loader-section',
                            'label'      => esc_html__( 'Select Loader', 'trendz-plus' ),
                            'choices'    => apply_filters( 'trendz_loader_layouts', array() ),
                            'dependency' => array( 'show_site_loader', '!=', '' ),
                        )
                    )
                );

                $wp_customize->add_setting(
                    TRENDZ_CUSTOMISER_VAL . '[site_loader_image]', array(
                        'type'    => 'option',
                    )
                );

                $wp_customize->add_control(
                    new Trendz_Customize_Control_Upload(
                        $wp_customize, TRENDZ_CUSTOMISER_VAL . '[site_loader_image]', array(
                            'type'       => 'wdt-upload',
                            'section'    => 'site-loader-section',
                            'label'      => esc_html__( 'Upload Loader Image', 'trendz-plus' ),
                            'dependency' => array( 'site_loader|show_site_loader', '==|!=', 'loader-4| ' ),
                        )
                    )
                );
        }

    }
}

TrendzPlusCustomizerSiteLoader::instance();

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists