HEX
Server: Apache
System: Linux p3plzcpnl476737.prod.phx3.secureserver.net 4.18.0-553.54.1.lve.el8.x86_64 #1 SMP Wed Jun 4 13:01:13 UTC 2025 x86_64
User: p8pyefaexf70 (9161224)
PHP: 7.4.33
Disabled: NONE
Upload Files
File: /home/p8pyefaexf70/www/wp-content/themes/veres/framework/classes/admin.php
<?php

// Do not allow directly accessing this file.
if ( ! defined( 'ABSPATH' ) ) {
    exit( 'Direct script access denied.' );
}

class Veres_Admin {

    public function __construct(){
        $this->load_config();
        add_action( 'admin_enqueue_scripts', array( $this, 'admin_scripts') );
        add_action( 'customize_controls_enqueue_scripts', array( $this, 'customize_scripts') );
    }

    private function load_config(){
        require_once get_theme_file_path('/framework/configs/options.php');
        require_once get_theme_file_path('/framework/configs/metaboxes.php');
    }

    public function admin_scripts(  ){
        $ext = defined('WP_DEBUG') && WP_DEBUG ? '' : '.min';
	    $theme_version = defined('WP_DEBUG') && WP_DEBUG ? time() : VERES_THEME_VERSION;
        wp_enqueue_style('veres-admin-css', get_theme_file_uri( '/assets/css/admin'.$ext.'.css' ), null, $theme_version );
        $body_font_family = veres_get_theme_mod('body_font_family');
        if(!empty($body_font_family)){
            wp_add_inline_style('veres-admin-css', '.block-editor .editor-styles-wrapper .editor-block-list__block{ font-family: '.$body_font_family.' }');
        }
    }

    public function customize_scripts(){
	    $ext = defined('WP_DEBUG') && WP_DEBUG ? '' : '.min';
        $theme_version = defined('WP_DEBUG') && WP_DEBUG ? time() : VERES_THEME_VERSION;
        $dependency = array(
            'jquery',
            'customize-base',
            'customize-controls',
        );
        wp_enqueue_script( 'veres-customize-admin', get_theme_file_uri('/assets/js/customizer'.$ext.'.js'), $dependency, $theme_version, true );
    }

}