| Server IP : 151.101.66.159 / Your IP : 216.73.216.66 Web Server : Flywheel/5.1.0 System : Linux wordpress 6.12.113+ #1 SMP Thu Oct 22 02:38:20 UTC 2026 x86_64 User : root ( ) PHP Version : 7.4.33.18 Disable Function : disk_free_space,diskfreespace,dl,exec,fpassthru,getmypid,getmyuid,highlight_file,link,opcache_compile_file,opcache_get_configuration,opcache_is_script_cached,passthru,pcntl_alarm,pcntl_exec,pcntl_fork,pcntl_get_last_error,pcntl_getpriority,pcntl_setpriority,pcntl_signal,pcntl_signal_dispatch,pcntl_sigprocmask,pcntl_sigtimedwait,pcntl_sigwaitinfo,pcntl_strerror,pcntl_wait,pcntl_waitpid,pcntl_wexitstatus,pcntl_wifcontinued,pcntl_wifexited,pcntl_wifsignaled,pcntl_wifstopped,pcntl_wstopsig,pcntl_wtermsig,phpinfo,popen,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_getpwnam,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_close,proc_get_status,proc_nice,proc_open,proc_terminate,shell_exec,show_source,socket_listen,source,system,virtual MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /www/wp-content/plugins/adminimize/inc-setup/ |
Upload File : |
<?php
/**
* some basics for message
*/
if ( ! function_exists( 'add_action' ) ) {
die( "Hi there! I'm just a part of plugin, not much I can do when called directly." );
}
// Need only on admin area
if ( ! is_admin() ) {
return;
}
// If is AJAX Call.
if ( defined( 'DOING_AJAX' ) && DOING_AJAX ) {
return;
}
class _mw_adminimize_message_class {
/**
* constructor
*/
public function __construct() {
$this->errors = new WP_Error();
$this->initialize_errors();
}
/**
* get_error - Returns an error message based on the passed code
* Parameters - $code (the error code as a string)
*
* @param string $code
*
* @return string $errorMessage
*/
public function get_error( $code = '' ) {
$errorMessage = $this->errors->get_error_message( $code );
if ( NULL === $errorMessage ) {
return esc_attr__( 'Unknown error.', 'adminimize' );
}
return $errorMessage;
}
/**
* Initializes all the error messages
*/
public function initialize_errors() {
$this->errors->add( '_mw_adminimize_update', esc_attr__( 'The updates were saved.', 'adminimize' ) );
$this->errors->add(
'_mw_adminimize_access_denied',
esc_attr__( 'You have not enough rights to edit entries in the database.', 'adminimize' )
);
$this->errors->add(
'_mw_adminimize_import', esc_attr__( 'All entries in the database were imported.', 'adminimize' )
);
$this->errors->add(
'_mw_adminimize_uninstall', esc_attr__( 'All entries in the database were deleted.', 'adminimize' )
);
$this->errors->add(
'_mw_adminimize_uninstall_yes', esc_attr__( 'Set the checkbox on deinstall-button.', 'adminimize' )
);
$this->errors->add(
'_mw_adminimize_get_option', esc_attr__( 'Can\'t load menu and submenu.', 'adminimize' )
);
$this->errors->add( '_mw_adminimize_set_theme', esc_attr__( 'Backend-Theme was activated!', 'adminimize' ) );
$this->errors->add(
'_mw_adminimize_load_theme', esc_attr__( 'Load user data to themes was successful.', 'adminimize' )
);
}
} // end class