| 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
/**
* Maintenance page.
*
* @author ThemeFusion
* @copyright (c) Copyright by ThemeFusion
* @link https://theme-fusion.com
* @package Avada
* @subpackage Core
* @since 4.0.0
*/
// Do not allow directly accessing this file.
if ( ! defined( 'ABSPATH' ) ) {
exit( 'Direct script access denied.' );
}
/**
* Maintenance page.
*/
class Avada_Maintenance {
/**
* The message that will be displayed to all non-admins.
* This will be displayed on the frontend instead of the normal site.
*
* @access private
* @var string
*/
private $users_warning = '';
/**
* Same as $users_warning but for admins.
*
* @access private
* @var string
*/
private $admin_warning = '';
/**
* Constructor.
*
* @access public
* @param bool $maintenance Maintenance on/off.
* @param string $users_warning The warning to show to users.
* @param string $admin_warning The warning to show to admins.
*/
public function __construct( $maintenance = false, $users_warning = '', $admin_warning = '' ) {
// No need to do anything if we're not in maintenance mode.
if ( true !== $maintenance ) {
return;
}
// Only continue if we're on the frontend.
if ( is_admin() ) {
return;
}
$this->users_warning = $users_warning;
$this->admin_warning = $admin_warning;
if ( is_admin() || ( in_array( $GLOBALS['pagenow'], [ 'wp-login.php', 'wp-register.php' ], true ) ) ) {
return;
}
$this->maintenance_page();
}
/**
* Displays the maintenance page.
*
* @access public
*/
public function maintenance_page() {
?>
<div class="wrapper" style="width:800px;max-width:95%;background:#f7f7f7;border:1px solid #f2f2f2;border-radius:3px;margin:auto;margin-top:200px;">
<div class="inner" style="padding:2rem;font-size:1.2rem;color:#333;">
<?php if ( current_user_can( 'install_plugins' ) ) : // Current user is an admin. ?>
<p><?php echo $this->admin_warning; // phpcs:ignore WordPress.Security.EscapeOutput ?></p>
<?php else : ?>
<p><?php echo $this->users_warning; // phpcs:ignore WordPress.Security.EscapeOutput ?></p>
<?php endif; ?>
</div>
</div>
<?php
exit;
}
}