errors.php
1.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<?php
/**
* @Description : Error Message
* @Package : Drag & Drop Multiple File Upload - Contact Form 7
* @Author : CodeDropz
*/
if ( ! defined( 'ABSPATH' ) || ! defined('dnd_upload_cf7') || ! defined('dnd_upload_cf7_PRO') ) {
exit;
}
class CodeDropz_Uploader_Errors {
private static $instance = null;
public $error_message = array();
public $wp_dir = array();
public static function get_instance() {
if( null === self::$instance ) {
self::$instance = new self();
}
return self::$instance;
}
public function __construct(){
// Set default error message
$this->error_message = array(
'server_limit' => __('The uploaded file exceeds the maximum upload size of your server.','dnd-upload-cf7'),
'failed_upload' => __('Uploading a file fails for any reason','dnd-upload-cf7'),
'large_file' => __('Uploaded file is too large','dnd-upload-cf7'),
'invalid_type' => __('Uploaded file is not allowed for file type','dnd-upload-cf7'),
'maxNumFiles' => __('You have reached the maximum number of files ( Only %s files allowed )','dnd-upload-cf7'),
'maxTotalSize' => __('The total file(s) size exceeding the max size limit of %s.','dnd-upload-cf7'),
'maxUploadLimit' => __('Note : Some of the files could not be uploaded ( Only %s files allowed )','dnd-upload-cf7'),
'minFileUpload' => __('Minimum file upload at least','dnd-upload-cf7')
);
}
public function get_error_message() {
return $this->error_message;
}
}