| Server IP : 77.39.210.126 / Your IP : 216.73.216.203 Web Server : Apache System : Linux v00l0v-vmpcnews.sphostserver.com 4.18.0-553.124.4.el8_10.x86_64 #1 SMP Fri May 15 04:14:14 EDT 2026 x86_64 User : artecasarepresti ( 1022) PHP Version : 7.4.33 Disable Function : dl,passthru,proc_open,proc_close,proc_terminate,shell_exec,system MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /home/artecasarepresti/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