| Server IP : 149.28.60.191 / Your IP : 216.73.217.128 Web Server : nginx/1.31.1 System : Linux vultr.guest 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64 User : mda ( ) PHP Version : 7.4.33 Disable Function : getmyuid,passthru,leak,listen,diskfreespace,tmpfile,link,shell_exec,dl,exec,system,highlight_file,source,show_source,fpassthru,virtual,posix_ctermid,posix_getcwd,posix_getegid,posix_geteuid,posix_getgid,posix_getgrgid,posix_getgrnam,posix_getgroups,posix_getlogin,posix_getpgid,posix_getpgrp,posix_getpid,posix_getppid,posix_getpwuid,posix_getrlimit,posix_getsid,posix_getuid,posix_isatty,posix_kill,posix_mkfifo,posix_setegid,posix_seteuid,posix_setgid,posix_setpgid,posix_setsid,posix_setuid,posix_times,posix_ttyname,posix_uname,proc_open,proc_close,proc_nice,proc_terminate,escapeshellcmd,ini_alter,popen,pcntl_exec,socket_accept,socket_bind,socket_clear_error,socket_close,socket_connect,symlink,posix_geteuid,ini_alter,socket_listen,socket_create_listen,socket_read,socket_create_pair,stream_socket_server MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /home/mda/webapps/mda-restore/wp-content/themes/Avada/includes/ |
Upload File : |
<?php
/**
* Fonts handling.
*
* @author ThemeFusion
* @copyright (c) Copyright by ThemeFusion
* @link https://theme-fusion.com
* @package Avada
* @subpackage Core
* @since 3.8
*/
// Do not allow directly accessing this file.
if ( ! defined( 'ABSPATH' ) ) {
exit( 'Direct script access denied.' );
}
/**
* Fonts handling.
*/
class Avada_Fonts {
/**
* Constructor.
*
* @access public
*/
public function __construct() {
add_filter( 'upload_mimes', [ $this, 'mime_types' ] );
}
/**
* Allow uploading font file types.
*
* @param array $mimes The mime types allowed.
* @access public
*/
public function mime_types( $mimes ) {
$mimes['woff2'] = 'font/woff2';
$mimes['woff'] = $this->get_mime( 'woff' );
$mimes['ttf'] = $this->get_mime( 'ttf' );
$mimes['eot'] = $this->get_mime( 'eot' );
$mimes['svg'] = $this->get_mime( 'svg' );
return $mimes;
}
/**
* Get the MIME type of the font-files
* by examining font-files included in the theme.
*
* @access private
* @since 5.2
* @param string $file_type The file-type we want to check.
* @return string
*/
private function get_mime( $file_type ) {
$path = FUSION_LIBRARY_URL . '/assets/fonts/icomoon/icomoon.' . $file_type;
if ( file_exists( $path ) && function_exists( 'mime_content_type' ) ) {
return mime_content_type( $path );
}
return 'font/' . $file_type;
}
}
/* Omit closing PHP tag to avoid "Headers already sent" issues. */