WordPress File Upload - Version 3.7.1

Version Description

  • internal code modifications and slight bug corrections
Download this release

Release Info

Developer nickboss
Plugin Icon 128x128 WordPress File Upload
Version 3.7.1
Comparing to
See all releases

Code changes from version 3.7.0 to 3.7.1

lib/wfu_admin.php CHANGED
@@ -358,108 +358,6 @@ function wfu_test_function() {
358
  echo "pass: ".$str;
359
  }
360
 
361
- function wfu_maintenance_actions($message = '') {
362
- if ( !current_user_can( 'manage_options' ) ) return wfu_manage_mainmenu();
363
-
364
- $siteurl = site_url();
365
-
366
- $echo_str = '<div class="wrap">';
367
- $echo_str .= "\n\t".'<h2>Wordpress File Upload Control Panel</h2>';
368
- if ( $message != '' ) {
369
- $echo_str .= "\n\t".'<div class="updated">';
370
- $echo_str .= "\n\t\t".'<p>'.$message.'</p>';
371
- $echo_str .= "\n\t".'</div>';
372
- }
373
- $echo_str .= "\n\t".'<div style="margin-top:20px;">';
374
- $echo_str .= wfu_generate_dashboard_menu("\n\t\t", "Maintenance Actions");
375
- //maintenance actions
376
- $echo_str .= "\n\t\t".'<h3 style="margin-bottom: 10px;">Maintenance Actions</h3>';
377
- $echo_str .= "\n\t\t".'<table class="form-table">';
378
- $echo_str .= "\n\t\t\t".'<tbody>';
379
- $echo_str .= "\n\t\t\t\t".'<tr>';
380
- $echo_str .= "\n\t\t\t\t\t".'<th scope="row">';
381
- $echo_str .= "\n\t\t\t\t\t\t".'<a href="'.$siteurl.'/wp-admin/options-general.php?page=wordpress_file_upload&amp;action=sync_db" class="button" title="Update database to reflect current status of files">Sync Database</a>';
382
- $echo_str .= "\n\t\t\t\t\t".'</th>';
383
- $echo_str .= "\n\t\t\t\t\t".'<td>';
384
- $echo_str .= "\n\t\t\t\t\t\t".'<label>Update database to reflect current status of files.</label>';
385
- $echo_str .= "\n\t\t\t\t\t".'</td>';
386
- $echo_str .= "\n\t\t\t\t".'</tr>';
387
- $echo_str .= "\n\t\t\t\t".'<tr>';
388
- $echo_str .= "\n\t\t\t\t\t".'<th scope="row">';
389
- $echo_str .= "\n\t\t\t\t\t\t".'<a href="'.$siteurl.'/wp-admin/options-general.php?page=wordpress_file_upload&amp;action=clean_log_ask" class="button" title="Clean all database log">Clean Log</a>';
390
- $echo_str .= "\n\t\t\t\t\t".'</th>';
391
- $echo_str .= "\n\t\t\t\t\t".'<td>';
392
- $echo_str .= "\n\t\t\t\t\t\t".'<label>Clean-up all database log, including file information and user data (files will not be affected).</label>';
393
- $echo_str .= "\n\t\t\t\t\t".'</td>';
394
- $echo_str .= "\n\t\t\t\t".'</tr>';
395
- $echo_str .= "\n\t\t\t".'</tbody>';
396
- $echo_str .= "\n\t\t".'</table>';
397
- $echo_str .= "\n\t".'</div>';
398
- //export actions
399
- $echo_str .= "\n\t\t".'<h3 style="margin-bottom: 10px; margin-top: 20px;">Export Actions</h3>';
400
- $echo_str .= "\n\t\t".'<table class="form-table">';
401
- $echo_str .= "\n\t\t\t".'<tbody>';
402
- $echo_str .= "\n\t\t\t\t".'<tr>';
403
- $echo_str .= "\n\t\t\t\t\t".'<th scope="row">';
404
- $echo_str .= "\n\t\t\t\t\t\t".'<a href="javascript:wfu_download_file(\'exportdata\', 1, \''.wp_create_nonce('wfu_download_file_invoker').'\');" class="button" title="Export uploaded file data">Export Uploaded File Data</a>';
405
- $echo_str .= "\n\t\t\t\t\t".'</th>';
406
- $echo_str .= "\n\t\t\t\t\t".'<td>';
407
- $echo_str .= "\n\t\t\t\t\t\t".'<label>Export uploaded valid file data, together with any userdata fields, to a comma-separated text file.</label>';
408
- $echo_str .= "\n\t\t\t\t\t\t".'<div id="wfu_file_download_container_1" style="display: none;"></div>';
409
- $echo_str .= "\n\t\t\t\t\t".'</td>';
410
- $echo_str .= "\n\t\t\t\t".'</tr>';
411
- $echo_str .= "\n\t\t\t".'</tbody>';
412
- $echo_str .= "\n\t\t".'</table>';
413
- $echo_str .= "\n\t".'</div>';
414
- $echo_str .= "\n".'</div>';
415
-
416
- echo $echo_str;
417
- }
418
-
419
- function wfu_clean_log_prompt() {
420
- $siteurl = site_url();
421
-
422
- if ( !current_user_can( 'manage_options' ) ) return wfu_manage_mainmenu();
423
-
424
- $echo_str = "\n".'<div class="wrap">';
425
- $echo_str .= "\n\t".'<div style="margin-top:20px;">';
426
- $echo_str .= "\n\t\t".'<a href="'.$siteurl.'/wp-admin/options-general.php?page=wordpress_file_upload&amp;action=maintenance_actions" class="button" title="go back">Go back</a>';
427
- $echo_str .= "\n\t".'</div>';
428
- $echo_str .= "\n\t".'<h2 style="margin-bottom: 10px;">Clean Database Log</h2>';
429
- $echo_str .= "\n\t".'<form enctype="multipart/form-data" name="clean_log" id="clean_log" method="post" action="'.$siteurl.'/wp-admin/options-general.php?page=wordpress_file_upload" class="validate">';
430
- $nonce = wp_nonce_field('wfu_clean_log', '_wpnonce', false, false);
431
- $nonce_ref = wp_referer_field(false);
432
- $echo_str .= "\n\t\t".$nonce;
433
- $echo_str .= "\n\t\t".$nonce_ref;
434
- $echo_str .= "\n\t\t".'<input type="hidden" name="action" value="clean_log">';
435
- $echo_str .= "\n\t\t".'<label>Are you sure that you want to clean the database log? This will erase all file data kept by the plugin in the database. Files uploaded by the plugin will be maintained, however all relevant information, such as user data, will be erased.</label><br/>';
436
- $echo_str .= "\n\t\t".'<p class="submit">';
437
- $echo_str .= "\n\t\t\t".'<input type="submit" class="button-primary" name="submit" value="Yes">';
438
- $echo_str .= "\n\t\t\t".'<input type="submit" class="button-primary" name="submit" value="Cancel">';
439
- $echo_str .= "\n\t\t".'</p>';
440
- $echo_str .= "\n\t".'</form>';
441
- $echo_str .= "\n".'</div>';
442
- return $echo_str;
443
- }
444
-
445
- function wfu_clean_log() {
446
- global $wpdb;
447
-
448
- if ( !current_user_can( 'manage_options' ) ) return -1;
449
- if ( !check_admin_referer('wfu_clean_log') ) return -1;
450
-
451
- $count = -1;
452
- if ( isset($_POST['submit']) && $_POST['submit'] == "Yes" ) {
453
- $table_name1 = $wpdb->prefix . "wfu_log";
454
- $table_name2 = $wpdb->prefix . "wfu_userdata";
455
-
456
- $count = $wpdb->query($wpdb->prepare("DELETE FROM ".$table_name1));
457
- $count += $wpdb->query($wpdb->prepare("DELETE FROM ".$table_name2));
458
- }
459
-
460
- return $count;
461
- }
462
-
463
  function wfu_construct_post_list($posts) {
464
  $ids = array();
465
  $list = array();
358
  echo "pass: ".$str;
359
  }
360
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
361
  function wfu_construct_post_list($posts) {
362
  $ids = array();
363
  $list = array();
lib/wfu_admin_browser.php CHANGED
@@ -11,7 +11,7 @@ function wfu_browse_files($basedir_code) {
11
  //first decode basedir_code
12
  $basedir = wfu_get_filepath_from_safe($basedir_code);
13
  //clean session array holding dir and file paths if it is too big
14
- if ( isset($_SESSION['wfu_filepath_safe_storage']) && count($_SESSION['wfu_filepath_safe_storage']) > WFU_PHP_ARRAY_MAXLEN ) $_SESSION['wfu_filepath_safe_storage'] = array();
15
 
16
  //extract sort info from basedir
17
  $sort = "";
11
  //first decode basedir_code
12
  $basedir = wfu_get_filepath_from_safe($basedir_code);
13
  //clean session array holding dir and file paths if it is too big
14
+ if ( isset($_SESSION['wfu_filepath_safe_storage']) && count($_SESSION['wfu_filepath_safe_storage']) > WFU_VAR("WFU_PHP_ARRAY_MAXLEN") ) $_SESSION['wfu_filepath_safe_storage'] = array();
15
 
16
  //extract sort info from basedir
17
  $sort = "";
lib/wfu_admin_log.php CHANGED
@@ -10,7 +10,7 @@ function wfu_view_log($page = 1, $only_table_rows = false) {
10
  if ( !current_user_can( 'manage_options' ) ) return;
11
  //get log data from database
12
  $files_total = $wpdb->get_var('SELECT COUNT(idlog) FROM '.$table_name1);
13
- $filerecs = $wpdb->get_results('SELECT * FROM '.$table_name1.' ORDER BY date_from DESC'.( WFU_HISTORYLOG_TABLE_MAXROWS > 0 ? ' LIMIT '.WFU_HISTORYLOG_TABLE_MAXROWS.' OFFSET '.(($page - 1) * (int)WFU_HISTORYLOG_TABLE_MAXROWS) : '' ));
14
 
15
  $echo_str = "";
16
  if ( !$only_table_rows ) {
@@ -20,8 +20,8 @@ function wfu_view_log($page = 1, $only_table_rows = false) {
20
  $echo_str .= wfu_generate_dashboard_menu("\n\t\t", "View Log");
21
  $echo_str .= "\n\t".'<div style="position:relative;">';
22
  $echo_str .= wfu_add_loading_overlay("\n\t\t", "historylog");
23
- if ( WFU_HISTORYLOG_TABLE_MAXROWS > 0 ) {
24
- $pages = ceil($files_total / WFU_HISTORYLOG_TABLE_MAXROWS);
25
  $echo_str .= wfu_add_pagination_header("\n\t\t", "historylog", 1, $pages);
26
  }
27
  $echo_str .= "\n\t\t".'<table id="wfu_historylog_table" class="wp-list-table widefat fixed striped">';
@@ -54,7 +54,7 @@ function wfu_view_log($page = 1, $only_table_rows = false) {
54
  $deletedfiles = array();
55
  $filecodes = array();
56
  $time0 = strtotime("0000-00-00 00:00:00");
57
- $i = ($page - 1) * (int)WFU_HISTORYLOG_TABLE_MAXROWS;
58
  foreach ( $filerecs as $filerec ) {
59
  $remarks = '';
60
  $filepath = ABSPATH;
10
  if ( !current_user_can( 'manage_options' ) ) return;
11
  //get log data from database
12
  $files_total = $wpdb->get_var('SELECT COUNT(idlog) FROM '.$table_name1);
13
+ $filerecs = $wpdb->get_results('SELECT * FROM '.$table_name1.' ORDER BY date_from DESC'.( WFU_VAR("WFU_HISTORYLOG_TABLE_MAXROWS") > 0 ? ' LIMIT '.WFU_VAR("WFU_HISTORYLOG_TABLE_MAXROWS").' OFFSET '.(($page - 1) * (int)WFU_VAR("WFU_HISTORYLOG_TABLE_MAXROWS")) : '' ));
14
 
15
  $echo_str = "";
16
  if ( !$only_table_rows ) {
20
  $echo_str .= wfu_generate_dashboard_menu("\n\t\t", "View Log");
21
  $echo_str .= "\n\t".'<div style="position:relative;">';
22
  $echo_str .= wfu_add_loading_overlay("\n\t\t", "historylog");
23
+ if ( WFU_VAR("WFU_HISTORYLOG_TABLE_MAXROWS") > 0 ) {
24
+ $pages = ceil($files_total / WFU_VAR("WFU_HISTORYLOG_TABLE_MAXROWS"));
25
  $echo_str .= wfu_add_pagination_header("\n\t\t", "historylog", 1, $pages);
26
  }
27
  $echo_str .= "\n\t\t".'<table id="wfu_historylog_table" class="wp-list-table widefat fixed striped">';
54
  $deletedfiles = array();
55
  $filecodes = array();
56
  $time0 = strtotime("0000-00-00 00:00:00");
57
+ $i = ($page - 1) * (int)WFU_VAR("WFU_HISTORYLOG_TABLE_MAXROWS");
58
  foreach ( $filerecs as $filerec ) {
59
  $remarks = '';
60
  $filepath = ABSPATH;
lib/wfu_admin_maintenance.php ADDED
@@ -0,0 +1,105 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ function wfu_maintenance_actions($message = '') {
4
+ if ( !current_user_can( 'manage_options' ) ) return wfu_manage_mainmenu();
5
+
6
+ $siteurl = site_url();
7
+
8
+ $echo_str = '<div class="wrap">';
9
+ $echo_str .= "\n\t".'<h2>Wordpress File Upload Control Panel</h2>';
10
+ if ( $message != '' ) {
11
+ $echo_str .= "\n\t".'<div class="updated">';
12
+ $echo_str .= "\n\t\t".'<p>'.$message.'</p>';
13
+ $echo_str .= "\n\t".'</div>';
14
+ }
15
+ $echo_str .= "\n\t".'<div style="margin-top:20px;">';
16
+ $echo_str .= wfu_generate_dashboard_menu("\n\t\t", "Maintenance Actions");
17
+ //maintenance actions
18
+ $echo_str .= "\n\t\t".'<h3 style="margin-bottom: 10px;">Maintenance Actions</h3>';
19
+ $echo_str .= "\n\t\t".'<table class="form-table">';
20
+ $echo_str .= "\n\t\t\t".'<tbody>';
21
+ $echo_str .= "\n\t\t\t\t".'<tr>';
22
+ $echo_str .= "\n\t\t\t\t\t".'<th scope="row">';
23
+ $echo_str .= "\n\t\t\t\t\t\t".'<a href="'.$siteurl.'/wp-admin/options-general.php?page=wordpress_file_upload&amp;action=sync_db" class="button" title="Update database to reflect current status of files">Sync Database</a>';
24
+ $echo_str .= "\n\t\t\t\t\t".'</th>';
25
+ $echo_str .= "\n\t\t\t\t\t".'<td>';
26
+ $echo_str .= "\n\t\t\t\t\t\t".'<label>Update database to reflect current status of files.</label>';
27
+ $echo_str .= "\n\t\t\t\t\t".'</td>';
28
+ $echo_str .= "\n\t\t\t\t".'</tr>';
29
+ $echo_str .= "\n\t\t\t\t".'<tr>';
30
+ $echo_str .= "\n\t\t\t\t\t".'<th scope="row">';
31
+ $echo_str .= "\n\t\t\t\t\t\t".'<a href="'.$siteurl.'/wp-admin/options-general.php?page=wordpress_file_upload&amp;action=clean_log_ask" class="button" title="Clean all database log">Clean Log</a>';
32
+ $echo_str .= "\n\t\t\t\t\t".'</th>';
33
+ $echo_str .= "\n\t\t\t\t\t".'<td>';
34
+ $echo_str .= "\n\t\t\t\t\t\t".'<label>Clean-up all database log, including file information and user data (files will not be affected).</label>';
35
+ $echo_str .= "\n\t\t\t\t\t".'</td>';
36
+ $echo_str .= "\n\t\t\t\t".'</tr>';
37
+ $echo_str .= "\n\t\t\t".'</tbody>';
38
+ $echo_str .= "\n\t\t".'</table>';
39
+ $echo_str .= "\n\t".'</div>';
40
+ //export actions
41
+ $echo_str .= "\n\t\t".'<h3 style="margin-bottom: 10px; margin-top: 20px;">Export Actions</h3>';
42
+ $echo_str .= "\n\t\t".'<table class="form-table">';
43
+ $echo_str .= "\n\t\t\t".'<tbody>';
44
+ $echo_str .= "\n\t\t\t\t".'<tr>';
45
+ $echo_str .= "\n\t\t\t\t\t".'<th scope="row">';
46
+ $echo_str .= "\n\t\t\t\t\t\t".'<a href="javascript:wfu_download_file(\'exportdata\', 1, \''.wp_create_nonce('wfu_download_file_invoker').'\');" class="button" title="Export uploaded file data">Export Uploaded File Data</a>';
47
+ $echo_str .= "\n\t\t\t\t\t".'</th>';
48
+ $echo_str .= "\n\t\t\t\t\t".'<td>';
49
+ $echo_str .= "\n\t\t\t\t\t\t".'<label>Export uploaded valid file data, together with any userdata fields, to a comma-separated text file.</label>';
50
+ $echo_str .= "\n\t\t\t\t\t\t".'<div id="wfu_file_download_container_1" style="display: none;"></div>';
51
+ $echo_str .= "\n\t\t\t\t\t".'</td>';
52
+ $echo_str .= "\n\t\t\t\t".'</tr>';
53
+ $echo_str .= "\n\t\t\t".'</tbody>';
54
+ $echo_str .= "\n\t\t".'</table>';
55
+ $echo_str .= "\n\t".'</div>';
56
+ $echo_str .= "\n".'</div>';
57
+
58
+ echo $echo_str;
59
+ }
60
+
61
+ function wfu_clean_log_prompt() {
62
+ $siteurl = site_url();
63
+
64
+ if ( !current_user_can( 'manage_options' ) ) return wfu_manage_mainmenu();
65
+
66
+ $echo_str = "\n".'<div class="wrap">';
67
+ $echo_str .= "\n\t".'<div style="margin-top:20px;">';
68
+ $echo_str .= "\n\t\t".'<a href="'.$siteurl.'/wp-admin/options-general.php?page=wordpress_file_upload&amp;action=maintenance_actions" class="button" title="go back">Go back</a>';
69
+ $echo_str .= "\n\t".'</div>';
70
+ $echo_str .= "\n\t".'<h2 style="margin-bottom: 10px;">Clean Database Log</h2>';
71
+ $echo_str .= "\n\t".'<form enctype="multipart/form-data" name="clean_log" id="clean_log" method="post" action="'.$siteurl.'/wp-admin/options-general.php?page=wordpress_file_upload" class="validate">';
72
+ $nonce = wp_nonce_field('wfu_clean_log', '_wpnonce', false, false);
73
+ $nonce_ref = wp_referer_field(false);
74
+ $echo_str .= "\n\t\t".$nonce;
75
+ $echo_str .= "\n\t\t".$nonce_ref;
76
+ $echo_str .= "\n\t\t".'<input type="hidden" name="action" value="clean_log">';
77
+ $echo_str .= "\n\t\t".'<label>Are you sure that you want to clean the database log? This will erase all file data kept by the plugin in the database. Files uploaded by the plugin will be maintained, however all relevant information, such as user data, will be erased.</label><br/>';
78
+ $echo_str .= "\n\t\t".'<p class="submit">';
79
+ $echo_str .= "\n\t\t\t".'<input type="submit" class="button-primary" name="submit" value="Yes">';
80
+ $echo_str .= "\n\t\t\t".'<input type="submit" class="button-primary" name="submit" value="Cancel">';
81
+ $echo_str .= "\n\t\t".'</p>';
82
+ $echo_str .= "\n\t".'</form>';
83
+ $echo_str .= "\n".'</div>';
84
+ return $echo_str;
85
+ }
86
+
87
+ function wfu_clean_log() {
88
+ global $wpdb;
89
+
90
+ if ( !current_user_can( 'manage_options' ) ) return -1;
91
+ if ( !check_admin_referer('wfu_clean_log') ) return -1;
92
+
93
+ $count = -1;
94
+ if ( isset($_POST['submit']) && $_POST['submit'] == "Yes" ) {
95
+ $table_name1 = $wpdb->prefix . "wfu_log";
96
+ $table_name2 = $wpdb->prefix . "wfu_userdata";
97
+
98
+ $count = $wpdb->query($wpdb->prepare("DELETE FROM ".$table_name1));
99
+ $count += $wpdb->query($wpdb->prepare("DELETE FROM ".$table_name2));
100
+ }
101
+
102
+ return $count;
103
+ }
104
+
105
+ ?>
lib/wfu_ajaxactions.php CHANGED
@@ -56,7 +56,7 @@ function wfu_ajax_action_send_email_notification() {
56
  }
57
 
58
  /* construct safe output */
59
- $sout = "0;".WFU_DEFAULTMESSAGECOLORS.";0";
60
 
61
  die("wfu_fileupload_success::".$sout.":".wfu_encode_array_to_string($params_output_array));
62
  }
@@ -461,7 +461,7 @@ function wfu_ajax_action_get_historylog_page() {
461
  if ( !isset($_POST['token']) || !isset($_POST['page']) ) die();
462
  check_ajax_referer( 'wfu-historylog-page', 'token' );
463
  if ( !current_user_can( 'manage_options' ) ) die();
464
- if ( WFU_HISTORYLOG_TABLE_MAXROWS <= 0 ) die();
465
 
466
  $page = wfu_sanitize_int($_POST['page']);
467
  $rows = wfu_view_log($page, true);
56
  }
57
 
58
  /* construct safe output */
59
+ $sout = "0;".WFU_VAR("WFU_DEFAULTMESSAGECOLORS").";0";
60
 
61
  die("wfu_fileupload_success::".$sout.":".wfu_encode_array_to_string($params_output_array));
62
  }
461
  if ( !isset($_POST['token']) || !isset($_POST['page']) ) die();
462
  check_ajax_referer( 'wfu-historylog-page', 'token' );
463
  if ( !current_user_can( 'manage_options' ) ) die();
464
+ if ( WFU_VAR("WFU_HISTORYLOG_TABLE_MAXROWS") <= 0 ) die();
465
 
466
  $page = wfu_sanitize_int($_POST['page']);
467
  $rows = wfu_view_log($page, true);
lib/wfu_attributes.php CHANGED
@@ -717,7 +717,7 @@ function wfu_attribute_definitions() {
717
  "attribute" => "uploadid",
718
  "type" => "integer",
719
  "listitems" => null,
720
- "value" => WFU_UPLOADID,
721
  "mode" => "free",
722
  "category" => "general",
723
  "subcategory" => "Basic Functionalities",
@@ -731,7 +731,7 @@ function wfu_attribute_definitions() {
731
  "attribute" => "singlebutton",
732
  "type" => "onoff",
733
  "listitems" => null,
734
- "value" => WFU_SINGLEBUTTON,
735
  "mode" => "free",
736
  "category" => "general",
737
  "subcategory" => "Basic Functionalities",
@@ -745,7 +745,7 @@ function wfu_attribute_definitions() {
745
  "attribute" => "uploadpath",
746
  "type" => "ltext",
747
  "listitems" => null,
748
- "value" => WFU_UPLOADPATH,
749
  "mode" => "free",
750
  "category" => "general",
751
  "subcategory" => "Basic Functionalities",
@@ -759,7 +759,7 @@ function wfu_attribute_definitions() {
759
  "attribute" => "fitmode",
760
  "type" => "radio",
761
  "listitems" => array("fixed", "responsive"),
762
- "value" => WFU_FITMODE,
763
  "mode" => "free",
764
  "category" => "general",
765
  "subcategory" => "Basic Functionalities",
@@ -773,7 +773,7 @@ function wfu_attribute_definitions() {
773
  "attribute" => "uploadrole",
774
  "type" => "rolelist",
775
  "listitems" => array("default_administrator"),
776
- "value" => WFU_UPLOADROLE,
777
  "mode" => "free",
778
  "category" => "general",
779
  "subcategory" => "Filters",
@@ -787,7 +787,7 @@ function wfu_attribute_definitions() {
787
  "attribute" => "uploadpatterns",
788
  "type" => "text",
789
  "listitems" => null,
790
- "value" => WFU_UPLOADPATTERNS,
791
  "mode" => "free",
792
  "category" => "general",
793
  "subcategory" => "Filters",
@@ -801,7 +801,7 @@ function wfu_attribute_definitions() {
801
  "attribute" => "maxsize",
802
  "type" => "float",
803
  "listitems" => null,
804
- "value" => WFU_MAXSIZE,
805
  "mode" => "free",
806
  "category" => "general",
807
  "subcategory" => "Filters",
@@ -815,7 +815,7 @@ function wfu_attribute_definitions() {
815
  "attribute" => "createpath",
816
  "type" => "onoff",
817
  "listitems" => null,
818
- "value" => WFU_CREATEPATH,
819
  "mode" => "free",
820
  "category" => "general",
821
  "subcategory" => "Upload Path and Files",
@@ -829,7 +829,7 @@ function wfu_attribute_definitions() {
829
  "attribute" => "forcefilename",
830
  "type" => "onoff",
831
  "listitems" => null,
832
- "value" => WFU_FORCEFILENAME,
833
  "mode" => "free",
834
  "category" => "general",
835
  "subcategory" => "Upload Path and Files",
@@ -843,7 +843,7 @@ function wfu_attribute_definitions() {
843
  "attribute" => "accessmethod",
844
  "type" => "radio",
845
  "listitems" => array("normal", "*ftp"),
846
- "value" => WFU_ACCESSMETHOD,
847
  "mode" => "free",
848
  "category" => "general",
849
  "subcategory" => "Upload Path and Files",
@@ -857,7 +857,7 @@ function wfu_attribute_definitions() {
857
  "attribute" => "ftpinfo",
858
  "type" => "ltext",
859
  "listitems" => null,
860
- "value" => WFU_FTPINFO,
861
  "mode" => "free",
862
  "category" => "general",
863
  "subcategory" => "Upload Path and Files",
@@ -871,7 +871,7 @@ function wfu_attribute_definitions() {
871
  "attribute" => "useftpdomain",
872
  "type" => "onoff",
873
  "listitems" => null,
874
- "value" => WFU_USEFTPDOMAIN,
875
  "mode" => "free",
876
  "category" => "general",
877
  "subcategory" => "Upload Path and Files",
@@ -885,7 +885,7 @@ function wfu_attribute_definitions() {
885
  "attribute" => "ftppassivemode",
886
  "type" => "onoff",
887
  "listitems" => null,
888
- "value" => WFU_FTPPASSIVEMODE,
889
  "mode" => "free",
890
  "category" => "general",
891
  "subcategory" => "Upload Path and Files",
@@ -899,7 +899,7 @@ function wfu_attribute_definitions() {
899
  "attribute" => "ftpfilepermissions",
900
  "type" => "text",
901
  "listitems" => null,
902
- "value" => WFU_FTPFILEPERMISSIONS,
903
  "mode" => "free",
904
  "category" => "general",
905
  "subcategory" => "Upload Path and Files",
@@ -913,7 +913,7 @@ function wfu_attribute_definitions() {
913
  "attribute" => "showtargetfolder",
914
  "type" => "onoff",
915
  "listitems" => null,
916
- "value" => WFU_SHOWTARGETFOLDER,
917
  "mode" => "free",
918
  "category" => "general",
919
  "subcategory" => "Upload Path and Files",
@@ -927,7 +927,7 @@ function wfu_attribute_definitions() {
927
  "attribute" => "askforsubfolders",
928
  "type" => "onoff",
929
  "listitems" => null,
930
- "value" => WFU_ASKFORSUBFOLDERS,
931
  "mode" => "free",
932
  "category" => "general",
933
  "subcategory" => "Upload Path and Files",
@@ -941,7 +941,7 @@ function wfu_attribute_definitions() {
941
  "attribute" => "subfoldertree",
942
  "type" => "folderlist",
943
  "listitems" => null,
944
- "value" => WFU_SUBFOLDERTREE,
945
  "mode" => "free",
946
  "category" => "general",
947
  "subcategory" => "Upload Path and Files",
@@ -955,7 +955,7 @@ function wfu_attribute_definitions() {
955
  "attribute" => "dublicatespolicy",
956
  "type" => "radio",
957
  "listitems" => array("overwrite", "reject", "*maintain both"),
958
- "value" => WFU_DUBLICATESPOLICY,
959
  "mode" => "free",
960
  "category" => "general",
961
  "subcategory" => "Upload Path and Files",
@@ -969,7 +969,7 @@ function wfu_attribute_definitions() {
969
  "attribute" => "uniquepattern",
970
  "type" => "radio",
971
  "listitems" => array("index", "datetimestamp"),
972
- "value" => WFU_UNIQUEPATTERN,
973
  "mode" => "free",
974
  "category" => "general",
975
  "subcategory" => "Upload Path and Files",
@@ -983,7 +983,7 @@ function wfu_attribute_definitions() {
983
  "attribute" => "redirect",
984
  "type" => "onoff",
985
  "listitems" => null,
986
- "value" => WFU_REDIRECT,
987
  "mode" => "free",
988
  "category" => "general",
989
  "subcategory" => "Redirection",
@@ -997,7 +997,7 @@ function wfu_attribute_definitions() {
997
  "attribute" => "redirectlink",
998
  "type" => "ltext",
999
  "listitems" => null,
1000
- "value" => WFU_REDIRECTLINK,
1001
  "mode" => "free",
1002
  "category" => "general",
1003
  "subcategory" => "Redirection",
@@ -1011,7 +1011,7 @@ function wfu_attribute_definitions() {
1011
  "attribute" => "adminmessages",
1012
  "type" => "onoff",
1013
  "listitems" => null,
1014
- "value" => WFU_ADMINMESSAGES,
1015
  "mode" => "free",
1016
  "category" => "general",
1017
  "subcategory" => "Other Administrator Options",
@@ -1025,7 +1025,7 @@ function wfu_attribute_definitions() {
1025
  "attribute" => "forceclassic",
1026
  "type" => "onoff",
1027
  "listitems" => null,
1028
- "value" => WFU_FORCECLASSIC,
1029
  "mode" => "free",
1030
  "category" => "general",
1031
  "subcategory" => "Other Administrator Options",
@@ -1039,7 +1039,7 @@ function wfu_attribute_definitions() {
1039
  "attribute" => "testmode",
1040
  "type" => "onoff",
1041
  "listitems" => null,
1042
- "value" => WFU_TESTMODE,
1043
  "mode" => "free",
1044
  "category" => "general",
1045
  "subcategory" => "Other Administrator Options",
@@ -1053,7 +1053,7 @@ function wfu_attribute_definitions() {
1053
  "attribute" => "debugmode",
1054
  "type" => "onoff",
1055
  "listitems" => null,
1056
- "value" => WFU_DEBUGMODE,
1057
  "mode" => "free",
1058
  "category" => "general",
1059
  "subcategory" => "Other Administrator Options",
@@ -1067,7 +1067,7 @@ function wfu_attribute_definitions() {
1067
  "attribute" => "placements",
1068
  "type" => "placements",
1069
  "listitems" => null,
1070
- "value" => WFU_PLACEMENTS,
1071
  "mode" => "free",
1072
  "category" => "placements",
1073
  "subcategory" => "Plugin Component Positions",
@@ -1123,7 +1123,7 @@ function wfu_attribute_definitions() {
1123
  "attribute" => "targetfolderlabel",
1124
  "type" => "text",
1125
  "listitems" => null,
1126
- "value" => WFU_TARGETFOLDERLABEL,
1127
  "mode" => "free",
1128
  "category" => "labels",
1129
  "subcategory" => "Upload Folder",
@@ -1137,7 +1137,7 @@ function wfu_attribute_definitions() {
1137
  "attribute" => "subfolderlabel",
1138
  "type" => "text",
1139
  "listitems" => null,
1140
- "value" => WFU_SUBFOLDERLABEL,
1141
  "mode" => "free",
1142
  "category" => "labels",
1143
  "subcategory" => "Upload Folder",
@@ -1207,7 +1207,7 @@ function wfu_attribute_definitions() {
1207
  "attribute" => "notify",
1208
  "type" => "onoff",
1209
  "listitems" => null,
1210
- "value" => WFU_NOTIFY,
1211
  "mode" => "free",
1212
  "category" => "notifications",
1213
  "subcategory" => "Email Notifications",
@@ -1221,7 +1221,7 @@ function wfu_attribute_definitions() {
1221
  "attribute" => "notifyrecipients",
1222
  "type" => "mtext",
1223
  "listitems" => null,
1224
- "value" => WFU_NOTIFYRECIPIENTS,
1225
  "mode" => "free",
1226
  "category" => "notifications",
1227
  "subcategory" => "Email Notifications",
@@ -1235,7 +1235,7 @@ function wfu_attribute_definitions() {
1235
  "attribute" => "notifyheaders",
1236
  "type" => "mtext",
1237
  "listitems" => null,
1238
- "value" => WFU_NOTIFYHEADERS,
1239
  "mode" => "free",
1240
  "category" => "notifications",
1241
  "subcategory" => "Email Notifications",
@@ -1277,7 +1277,7 @@ function wfu_attribute_definitions() {
1277
  "attribute" => "attachfile",
1278
  "type" => "onoff",
1279
  "listitems" => null,
1280
- "value" => WFU_ATTACHFILE,
1281
  "mode" => "free",
1282
  "category" => "notifications",
1283
  "subcategory" => "Email Notifications",
@@ -1305,7 +1305,7 @@ function wfu_attribute_definitions() {
1305
  "attribute" => "successmessagecolors",
1306
  "type" => "color-triplet",
1307
  "listitems" => null,
1308
- "value" => WFU_SUCCESSMESSAGECOLORS,
1309
  "mode" => "free",
1310
  "category" => "colors",
1311
  "subcategory" => "Upload Message Colors",
@@ -1319,7 +1319,7 @@ function wfu_attribute_definitions() {
1319
  "attribute" => "warningmessagecolors",
1320
  "type" => "color-triplet",
1321
  "listitems" => null,
1322
- "value" => WFU_WARNINGMESSAGECOLORS,
1323
  "mode" => "free",
1324
  "category" => "colors",
1325
  "subcategory" => "Upload Message Colors",
@@ -1333,7 +1333,7 @@ function wfu_attribute_definitions() {
1333
  "attribute" => "failmessagecolors",
1334
  "type" => "color-triplet",
1335
  "listitems" => null,
1336
- "value" => WFU_FAILMESSAGECOLORS,
1337
  "mode" => "free",
1338
  "category" => "colors",
1339
  "subcategory" => "Upload Message Colors",
@@ -1347,7 +1347,7 @@ function wfu_attribute_definitions() {
1347
  "attribute" => "waitmessagecolors",
1348
  "type" => "color-triplet",
1349
  "listitems" => null,
1350
- "value" => WFU_WAITMESSAGECOLORS,
1351
  "mode" => "free",
1352
  "category" => "colors",
1353
  "subcategory" => "Upload Message Colors",
@@ -1361,7 +1361,7 @@ function wfu_attribute_definitions() {
1361
  "attribute" => "widths",
1362
  "type" => "dimensions",
1363
  "listitems" => null,
1364
- "value" => WFU_WIDTHS,
1365
  "mode" => "free",
1366
  "category" => "dimensions",
1367
  "subcategory" => "Plugin Component Widths",
@@ -1375,7 +1375,7 @@ function wfu_attribute_definitions() {
1375
  "attribute" => "heights",
1376
  "type" => "dimensions",
1377
  "listitems" => null,
1378
- "value" => WFU_HEIGHTS,
1379
  "mode" => "free",
1380
  "category" => "dimensions",
1381
  "subcategory" => "Plugin Component Heights",
@@ -1389,7 +1389,7 @@ function wfu_attribute_definitions() {
1389
  "attribute" => "userdata",
1390
  "type" => "onoff",
1391
  "listitems" => null,
1392
- "value" => WFU_USERDATA,
1393
  "mode" => "free",
1394
  "category" => "userdata",
1395
  "subcategory" => "Additional Data Fields",
@@ -1417,7 +1417,7 @@ function wfu_attribute_definitions() {
1417
  "attribute" => "filebaselink",
1418
  "type" => "onoff",
1419
  "listitems" => null,
1420
- "value" => WFU_FILEBASELINK,
1421
  "mode" => "free",
1422
  "category" => "interoperability",
1423
  "subcategory" => "Connection With Other Plugins",
@@ -1431,7 +1431,7 @@ function wfu_attribute_definitions() {
1431
  "attribute" => "medialink",
1432
  "type" => "onoff",
1433
  "listitems" => null,
1434
- "value" => WFU_MEDIALINK,
1435
  "mode" => "free",
1436
  "category" => "interoperability",
1437
  "subcategory" => "Connection With Other Wordpress Features",
@@ -1445,7 +1445,7 @@ function wfu_attribute_definitions() {
1445
  "attribute" => "postlink",
1446
  "type" => "onoff",
1447
  "listitems" => null,
1448
- "value" => WFU_POSTLINK,
1449
  "mode" => "free",
1450
  "category" => "interoperability",
1451
  "subcategory" => "Connection With Other Wordpress Features",
717
  "attribute" => "uploadid",
718
  "type" => "integer",
719
  "listitems" => null,
720
+ "value" => WFU_VAR("WFU_UPLOADID"),
721
  "mode" => "free",
722
  "category" => "general",
723
  "subcategory" => "Basic Functionalities",
731
  "attribute" => "singlebutton",
732
  "type" => "onoff",
733
  "listitems" => null,
734
+ "value" => WFU_VAR("WFU_SINGLEBUTTON"),
735
  "mode" => "free",
736
  "category" => "general",
737
  "subcategory" => "Basic Functionalities",
745
  "attribute" => "uploadpath",
746
  "type" => "ltext",
747
  "listitems" => null,
748
+ "value" => WFU_VAR("WFU_UPLOADPATH"),
749
  "mode" => "free",
750
  "category" => "general",
751
  "subcategory" => "Basic Functionalities",
759
  "attribute" => "fitmode",
760
  "type" => "radio",
761
  "listitems" => array("fixed", "responsive"),
762
+ "value" => WFU_VAR("WFU_FITMODE"),
763
  "mode" => "free",
764
  "category" => "general",
765
  "subcategory" => "Basic Functionalities",
773
  "attribute" => "uploadrole",
774
  "type" => "rolelist",
775
  "listitems" => array("default_administrator"),
776
+ "value" => WFU_VAR("WFU_UPLOADROLE"),
777
  "mode" => "free",
778
  "category" => "general",
779
  "subcategory" => "Filters",
787
  "attribute" => "uploadpatterns",
788
  "type" => "text",
789
  "listitems" => null,
790
+ "value" => WFU_VAR("WFU_UPLOADPATTERNS"),
791
  "mode" => "free",
792
  "category" => "general",
793
  "subcategory" => "Filters",
801
  "attribute" => "maxsize",
802
  "type" => "float",
803
  "listitems" => null,
804
+ "value" => WFU_VAR("WFU_MAXSIZE"),
805
  "mode" => "free",
806
  "category" => "general",
807
  "subcategory" => "Filters",
815
  "attribute" => "createpath",
816
  "type" => "onoff",
817
  "listitems" => null,
818
+ "value" => WFU_VAR("WFU_CREATEPATH"),
819
  "mode" => "free",
820
  "category" => "general",
821
  "subcategory" => "Upload Path and Files",
829
  "attribute" => "forcefilename",
830
  "type" => "onoff",
831
  "listitems" => null,
832
+ "value" => WFU_VAR("WFU_FORCEFILENAME"),
833
  "mode" => "free",
834
  "category" => "general",
835
  "subcategory" => "Upload Path and Files",
843
  "attribute" => "accessmethod",
844
  "type" => "radio",
845
  "listitems" => array("normal", "*ftp"),
846
+ "value" => WFU_VAR("WFU_ACCESSMETHOD"),
847
  "mode" => "free",
848
  "category" => "general",
849
  "subcategory" => "Upload Path and Files",
857
  "attribute" => "ftpinfo",
858
  "type" => "ltext",
859
  "listitems" => null,
860
+ "value" => WFU_VAR("WFU_FTPINFO"),
861
  "mode" => "free",
862
  "category" => "general",
863
  "subcategory" => "Upload Path and Files",
871
  "attribute" => "useftpdomain",
872
  "type" => "onoff",
873
  "listitems" => null,
874
+ "value" => WFU_VAR("WFU_USEFTPDOMAIN"),
875
  "mode" => "free",
876
  "category" => "general",
877
  "subcategory" => "Upload Path and Files",
885
  "attribute" => "ftppassivemode",
886
  "type" => "onoff",
887
  "listitems" => null,
888
+ "value" => WFU_VAR("WFU_FTPPASSIVEMODE"),
889
  "mode" => "free",
890
  "category" => "general",
891
  "subcategory" => "Upload Path and Files",
899
  "attribute" => "ftpfilepermissions",
900
  "type" => "text",
901
  "listitems" => null,
902
+ "value" => WFU_VAR("WFU_FTPFILEPERMISSIONS"),
903
  "mode" => "free",
904
  "category" => "general",
905
  "subcategory" => "Upload Path and Files",
913
  "attribute" => "showtargetfolder",
914
  "type" => "onoff",
915
  "listitems" => null,
916
+ "value" => WFU_VAR("WFU_SHOWTARGETFOLDER"),
917
  "mode" => "free",
918
  "category" => "general",
919
  "subcategory" => "Upload Path and Files",
927
  "attribute" => "askforsubfolders",
928
  "type" => "onoff",
929
  "listitems" => null,
930
+ "value" => WFU_VAR("WFU_ASKFORSUBFOLDERS"),
931
  "mode" => "free",
932
  "category" => "general",
933
  "subcategory" => "Upload Path and Files",
941
  "attribute" => "subfoldertree",
942
  "type" => "folderlist",
943
  "listitems" => null,
944
+ "value" => WFU_VAR("WFU_SUBFOLDERTREE"),
945
  "mode" => "free",
946
  "category" => "general",
947
  "subcategory" => "Upload Path and Files",
955
  "attribute" => "dublicatespolicy",
956
  "type" => "radio",
957
  "listitems" => array("overwrite", "reject", "*maintain both"),
958
+ "value" => WFU_VAR("WFU_DUBLICATESPOLICY"),
959
  "mode" => "free",
960
  "category" => "general",
961
  "subcategory" => "Upload Path and Files",
969
  "attribute" => "uniquepattern",
970
  "type" => "radio",
971
  "listitems" => array("index", "datetimestamp"),
972
+ "value" => WFU_VAR("WFU_UNIQUEPATTERN"),
973
  "mode" => "free",
974
  "category" => "general",
975
  "subcategory" => "Upload Path and Files",
983
  "attribute" => "redirect",
984
  "type" => "onoff",
985
  "listitems" => null,
986
+ "value" => WFU_VAR("WFU_REDIRECT"),
987
  "mode" => "free",
988
  "category" => "general",
989
  "subcategory" => "Redirection",
997
  "attribute" => "redirectlink",
998
  "type" => "ltext",
999
  "listitems" => null,
1000
+ "value" => WFU_VAR("WFU_REDIRECTLINK"),
1001
  "mode" => "free",
1002
  "category" => "general",
1003
  "subcategory" => "Redirection",
1011
  "attribute" => "adminmessages",
1012
  "type" => "onoff",
1013
  "listitems" => null,
1014
+ "value" => WFU_VAR("WFU_ADMINMESSAGES"),
1015
  "mode" => "free",
1016
  "category" => "general",
1017
  "subcategory" => "Other Administrator Options",
1025
  "attribute" => "forceclassic",
1026
  "type" => "onoff",
1027
  "listitems" => null,
1028
+ "value" => WFU_VAR("WFU_FORCECLASSIC"),
1029
  "mode" => "free",
1030
  "category" => "general",
1031
  "subcategory" => "Other Administrator Options",
1039
  "attribute" => "testmode",
1040
  "type" => "onoff",
1041
  "listitems" => null,
1042
+ "value" => WFU_VAR("WFU_TESTMODE"),
1043
  "mode" => "free",
1044
  "category" => "general",
1045
  "subcategory" => "Other Administrator Options",
1053
  "attribute" => "debugmode",
1054
  "type" => "onoff",
1055
  "listitems" => null,
1056
+ "value" => WFU_VAR("WFU_DEBUGMODE"),
1057
  "mode" => "free",
1058
  "category" => "general",
1059
  "subcategory" => "Other Administrator Options",
1067
  "attribute" => "placements",
1068
  "type" => "placements",
1069
  "listitems" => null,
1070
+ "value" => WFU_VAR("WFU_PLACEMENTS"),
1071
  "mode" => "free",
1072
  "category" => "placements",
1073
  "subcategory" => "Plugin Component Positions",
1123
  "attribute" => "targetfolderlabel",
1124
  "type" => "text",
1125
  "listitems" => null,
1126
+ "value" => WFU_VAR("WFU_TARGETFOLDERLABEL"),
1127
  "mode" => "free",
1128
  "category" => "labels",
1129
  "subcategory" => "Upload Folder",
1137
  "attribute" => "subfolderlabel",
1138
  "type" => "text",
1139
  "listitems" => null,
1140
+ "value" => WFU_VAR("WFU_SUBFOLDERLABEL"),
1141
  "mode" => "free",
1142
  "category" => "labels",
1143
  "subcategory" => "Upload Folder",
1207
  "attribute" => "notify",
1208
  "type" => "onoff",
1209
  "listitems" => null,
1210
+ "value" => WFU_VAR("WFU_NOTIFY"),
1211
  "mode" => "free",
1212
  "category" => "notifications",
1213
  "subcategory" => "Email Notifications",
1221
  "attribute" => "notifyrecipients",
1222
  "type" => "mtext",
1223
  "listitems" => null,
1224
+ "value" => WFU_VAR("WFU_NOTIFYRECIPIENTS"),
1225
  "mode" => "free",
1226
  "category" => "notifications",
1227
  "subcategory" => "Email Notifications",
1235
  "attribute" => "notifyheaders",
1236
  "type" => "mtext",
1237
  "listitems" => null,
1238
+ "value" => WFU_VAR("WFU_NOTIFYHEADERS"),
1239
  "mode" => "free",
1240
  "category" => "notifications",
1241
  "subcategory" => "Email Notifications",
1277
  "attribute" => "attachfile",
1278
  "type" => "onoff",
1279
  "listitems" => null,
1280
+ "value" => WFU_VAR("WFU_ATTACHFILE"),
1281
  "mode" => "free",
1282
  "category" => "notifications",
1283
  "subcategory" => "Email Notifications",
1305
  "attribute" => "successmessagecolors",
1306
  "type" => "color-triplet",
1307
  "listitems" => null,
1308
+ "value" => WFU_VAR("WFU_SUCCESSMESSAGECOLORS"),
1309
  "mode" => "free",
1310
  "category" => "colors",
1311
  "subcategory" => "Upload Message Colors",
1319
  "attribute" => "warningmessagecolors",
1320
  "type" => "color-triplet",
1321
  "listitems" => null,
1322
+ "value" => WFU_VAR("WFU_WARNINGMESSAGECOLORS"),
1323
  "mode" => "free",
1324
  "category" => "colors",
1325
  "subcategory" => "Upload Message Colors",
1333
  "attribute" => "failmessagecolors",
1334
  "type" => "color-triplet",
1335
  "listitems" => null,
1336
+ "value" => WFU_VAR("WFU_FAILMESSAGECOLORS"),
1337
  "mode" => "free",
1338
  "category" => "colors",
1339
  "subcategory" => "Upload Message Colors",
1347
  "attribute" => "waitmessagecolors",
1348
  "type" => "color-triplet",
1349
  "listitems" => null,
1350
+ "value" => WFU_VAR("WFU_WAITMESSAGECOLORS"),
1351
  "mode" => "free",
1352
  "category" => "colors",
1353
  "subcategory" => "Upload Message Colors",
1361
  "attribute" => "widths",
1362
  "type" => "dimensions",
1363
  "listitems" => null,
1364
+ "value" => WFU_VAR("WFU_WIDTHS"),
1365
  "mode" => "free",
1366
  "category" => "dimensions",
1367
  "subcategory" => "Plugin Component Widths",
1375
  "attribute" => "heights",
1376
  "type" => "dimensions",
1377
  "listitems" => null,
1378
+ "value" => WFU_VAR("WFU_HEIGHTS"),
1379
  "mode" => "free",
1380
  "category" => "dimensions",
1381
  "subcategory" => "Plugin Component Heights",
1389
  "attribute" => "userdata",
1390
  "type" => "onoff",
1391
  "listitems" => null,
1392
+ "value" => WFU_VAR("WFU_USERDATA"),
1393
  "mode" => "free",
1394
  "category" => "userdata",
1395
  "subcategory" => "Additional Data Fields",
1417
  "attribute" => "filebaselink",
1418
  "type" => "onoff",
1419
  "listitems" => null,
1420
+ "value" => WFU_VAR("WFU_FILEBASELINK"),
1421
  "mode" => "free",
1422
  "category" => "interoperability",
1423
  "subcategory" => "Connection With Other Plugins",
1431
  "attribute" => "medialink",
1432
  "type" => "onoff",
1433
  "listitems" => null,
1434
+ "value" => WFU_VAR("WFU_MEDIALINK"),
1435
  "mode" => "free",
1436
  "category" => "interoperability",
1437
  "subcategory" => "Connection With Other Wordpress Features",
1445
  "attribute" => "postlink",
1446
  "type" => "onoff",
1447
  "listitems" => null,
1448
+ "value" => WFU_VAR("WFU_POSTLINK"),
1449
  "mode" => "free",
1450
  "category" => "interoperability",
1451
  "subcategory" => "Connection With Other Wordpress Features",
lib/wfu_constants.php CHANGED
@@ -184,72 +184,88 @@ DEFINE("WFU_WIDGET_SIDEBAR_DEFAULTTITLE", __('Upload Files', 'wp-file-upload'));
184
 
185
  /*********** Environment Variables ************/
186
  //plugin default values
187
- DEFINE("WFU_UPLOADID", "1");
188
- DEFINE("WFU_SINGLEBUTTON", "false");
189
- DEFINE("WFU_UPLOADROLE", "all,guests");
190
- DEFINE("WFU_UPLOADPATH", 'uploads');
191
- DEFINE("WFU_FITMODE", 'fixed');
192
- DEFINE("WFU_CREATEPATH", "false");
193
- DEFINE("WFU_FORCEFILENAME", "false");
194
- DEFINE("WFU_UPLOADPATTERNS", "*.*");
195
- DEFINE("WFU_MAXSIZE", "50");
196
- DEFINE("WFU_ACCESSMETHOD", "normal");
197
- DEFINE("WFU_FTPINFO", "");
198
- DEFINE("WFU_USEFTPDOMAIN", "false");
199
- DEFINE("WFU_FTPPASSIVEMODE", "false");
200
- DEFINE("WFU_FTPFILEPERMISSIONS", "");
201
- DEFINE("WFU_DUBLICATESPOLICY", "overwrite");
202
- DEFINE("WFU_UNIQUEPATTERN", "index");
203
- DEFINE("WFU_FILEBASELINK", "false");
204
- DEFINE("WFU_NOTIFY", "false");
205
- DEFINE("WFU_NOTIFYRECIPIENTS", "");
206
- DEFINE("WFU_NOTIFYHEADERS", "");
207
- DEFINE("WFU_ATTACHFILE", "false");
208
- DEFINE("WFU_REDIRECT", "false");
209
- DEFINE("WFU_REDIRECTLINK", "");
210
- DEFINE("WFU_ADMINMESSAGES", "false");
211
- DEFINE("WFU_SUCCESSMESSAGECOLOR", "green");
212
- DEFINE("WFU_SUCCESSMESSAGECOLORS", "#006600,#EEFFEE,#006666");
213
- DEFINE("WFU_WARNINGMESSAGECOLORS", "#F88017,#FEF2E7,#633309");
214
- DEFINE("WFU_FAILMESSAGECOLORS", "#660000,#FFEEEE,#666600");
215
- DEFINE("WFU_WAITMESSAGECOLORS", "#666666,#EEEEEE,#333333");
216
- DEFINE("WFU_SHOWTARGETFOLDER", "false");
217
- DEFINE("WFU_TARGETFOLDERLABEL", "Upload Directory");
218
- DEFINE("WFU_ASKFORSUBFOLDERS", "false");
219
- DEFINE("WFU_SUBFOLDERLABEL", "Select Subfolder");
220
- DEFINE("WFU_SUBFOLDERTREE", "");
221
- DEFINE("WFU_FORCECLASSIC", "false");
222
- DEFINE("WFU_TESTMODE", "false");
223
- DEFINE("WFU_DEBUGMODE", "false");
224
- DEFINE("WFU_WIDTHS", "");
225
- DEFINE("WFU_HEIGHTS", "");
226
- DEFINE("WFU_PLACEMENTS", "title/filename+selectbutton+uploadbutton/subfolders"."/userdata"."/message");
227
- DEFINE("WFU_USERDATA", "false");
228
- DEFINE("WFU_MEDIALINK", "false");
229
- DEFINE("WFU_POSTLINK", "false");
 
230
  //other plugin values
231
- DEFINE("WFU_MAX_TIME_LIMIT", ini_get("max_input_time"));
232
- DEFINE("WFU_PHP_ARRAY_MAXLEN", '10000');
233
- DEFINE("WFU_HISTORYLOG_TABLE_MAXROWS", 25);
 
234
  //color definitions
235
- DEFINE("WFU_TESTMESSAGECOLORS", "#666666,#EEEEEE,#333333");
236
- DEFINE("WFU_DEFAULTMESSAGECOLORS", "#666666,#EEEEEE,#333333");
237
- DEFINE("WFU_HEADERMESSAGECOLORS_STATE0", "#666666,#EEEEEE,#333333");
238
- DEFINE("WFU_HEADERMESSAGECOLORS_STATE1", "#F88017,#FEF2E7,#633309");
239
- DEFINE("WFU_HEADERMESSAGECOLORS_STATE2", "#660000,#FFEEEE,#666600");
240
- DEFINE("WFU_HEADERMESSAGECOLORS_STATE3", "#660000,#FFEEEE,#666600");
241
- DEFINE("WFU_HEADERMESSAGECOLORS_STATE4", "#006600,#EEFFEE,#006666");
242
- DEFINE("WFU_HEADERMESSAGECOLORS_STATE5", "#F88017,#FEF2E7,#633309");
243
- DEFINE("WFU_HEADERMESSAGECOLORS_STATE6", "#660000,#FFEEEE,#666600");
244
- DEFINE("WFU_HEADERMESSAGECOLORS_STATE7", "#660000,#FFEEEE,#666600");
245
- DEFINE("WFU_HEADERMESSAGECOLORS_STATE8", "#660000,#FFEEEE,#666600");
246
- DEFINE("WFU_HEADERMESSAGECOLORS_STATE9", "#666666,#EEEEEE,#333333");
247
- DEFINE("WFU_HEADERMESSAGECOLORS_STATE10", "#F88017,#FEF2E7,#633309");
248
- DEFINE("WFU_HEADERMESSAGECOLORS_STATE11", "#666666,#EEEEEE,#333333");
249
- DEFINE("WFU_HEADERMESSAGECOLORS_STATE12", "#660000,#FFEEEE,#666600");
 
 
 
 
 
 
 
 
 
 
 
 
250
 
251
  /************** Constant Values ***************/
252
  //other plugin values
 
 
253
  DEFINE("WFU_RESPONSE_URL", $siteurl.WPFILEUPLOAD_DIR."wfu_response.php");
254
  DEFINE("WFU_AJAX_URL", $siteurl."/wp-admin/admin-ajax.php");
255
  DEFINE("WFU_SERVICES_SERVER_URL", 'https://services2.iptanus.com');
@@ -289,8 +305,8 @@ function wfu_set_javascript_constants() {
289
  "jsonparse_headermessage" => WFU_ERROR_JSONPARSE_HEADERMESSAGE,
290
  "jsonparse_headeradminmessage" => WFU_ERROR_JSONPARSE_HEADERADMINMESSAGE,
291
  "same_pluginid" => WFU_ERROR_SAME_PLUGINID,
292
- "default_colors" => WFU_DEFAULTMESSAGECOLORS,
293
- "fail_colors" => WFU_FAILMESSAGECOLORS,
294
  "max_time_limit" => WFU_MAX_TIME_LIMIT,
295
  "response_url" => WFU_RESPONSE_URL,
296
  "ajax_url" => WFU_AJAX_URL,
184
 
185
  /*********** Environment Variables ************/
186
  //plugin default values
187
+ $GLOBALS["WFU_GLOBALS"] = array(
188
+ "WFU_UPLOADID" => array( "Default Upload ID", "string", "1", "The default upload ID of the uploader shortcode. It can be any integer from 1 and above." ),
189
+ "WFU_SINGLEBUTTON" => array( "Default Single-Button Status", "string", "false", "The default single-button status of the uploader shortcode. It can be 'true' or 'false'." ),
190
+ "WFU_UPLOADROLE" => array( "Default Upload Role", "string", "all,guests", "The default upload role of the uploader shortcode. It can be a comma-separated list of role slugs, including keywords 'all' and 'guests'." ),
191
+ "WFU_UPLOADPATH" => array( "Default Upload Path", "string", "uploads", "The default upload path of the uploader shortcode. It must be a folder relative to wp-content dir." ),
192
+ "WFU_FITMODE" => array( "Default Fit Mode", "string", "fixed", "The default fit mode of the uploader shortcode. It can be 'fixed' or 'responsive'." ),
193
+ "WFU_CREATEPATH" => array( "Default Create Path State", "string", "false", "The default create path state (create or not the upload path if it does not exist) of the uploader shortcode. It can be 'true' or 'false'." ),
194
+ "WFU_FORCEFILENAME" => array( "Default Force Filename State", "string", "false", "The default force filename state (force plugin to leave filename unchanged) of the uploader shortcode. It can be 'true' or 'false'." ),
195
+ "WFU_UPLOADPATTERNS" => array( "Default Upload Extensions", "string", "*.*", "The default allowed file extensions of the uploader shortcode. It can be a comma-separated list of wildcard extensions." ),
196
+ "WFU_MAXSIZE" => array( "Default Maximum File Size", "string", "50", "The default maximum allowed file size of the uploader shortcode in Megabytes. It can be any positive number." ),
197
+ "WFU_ACCESSMETHOD" => array( "Default Access Method", "string", "normal", "The default access method (of the website filesystem) of the uploader shortcode. It can be 'normal' or 'ftp'." ),
198
+ "WFU_FTPINFO" => array( "Default FTP Access Information", "string", "", "The default FTP access parameters of the uploader shortcode. It's syntax is 'username:password@ftp_domain'." ),
199
+ "WFU_USEFTPDOMAIN" => array( "Default Use FTP Domain State", "string", "false", "The default use FTP domain state (use the FTP domain defined in ftpinfo to store the uploaded files) of the uploader shortcode. It can be 'true' or 'false'." ),
200
+ "WFU_FTPPASSIVEMODE" => array( "Default FTP Passive Mode State", "string", "false", "The default FTP passive mode (use passive mode or not for FTP access) of the uploader shortcode. It can be 'true' or 'false'." ),
201
+ "WFU_FTPFILEPERMISSIONS" => array( "Default FTP File Permissions", "string", "", "The default FTP passive mode (use passive mode or not for FTP access) of the uploader shortcode. It can be 'true' or 'false'." ),
202
+ "WFU_DUBLICATESPOLICY" => array( "Default Duplicate File Action", "string", "overwrite", "The default duplicate file action of the uploader shortcode. It can be 'overwrite', 'reject' or 'mantain both'." ),
203
+ "WFU_UNIQUEPATTERN" => array( "Default Duplicate File Pattern", "string", "index", "The default duplicate file pattern of the uploader shortcode. It can be 'index' or 'datetimestamp'." ),
204
+ "WFU_FILEBASELINK" => array( "Default WPFilebase Update State", "string", "false", "The default WPFilebase plugin update state of the uploader shortcode. It can be 'true' or 'false'." ),
205
+ "WFU_NOTIFY" => array( "Default Email Notification State", "string", "false", "The default email notification state of the uploader shortcode. It can be 'true' or 'false'." ),
206
+ "WFU_NOTIFYRECIPIENTS" => array( "Default Email Recipients", "string", "", "The default email recipients of the uploader shortcode. It can be a comma-separated list of email addresses." ),
207
+ "WFU_NOTIFYHEADERS" => array( "Default Email Headers", "string", "", "The default email headers of the uploader shortcode." ),
208
+ "WFU_ATTACHFILE" => array( "Default Attach File State", "string", "false", "The default attach file to email state of the uploader shortcode. It can be 'true' or 'false'." ),
209
+ "WFU_REDIRECT" => array( "Default Redirection State", "string", "false", "The default redirection state of the uploader shortcode. It can be 'true' or 'false'." ),
210
+ "WFU_REDIRECTLINK" => array( "Default Redirect URL", "string", "", "The default redirect URL of the uploader shortcode." ),
211
+ "WFU_ADMINMESSAGES" => array( "Default State for Admin Messages", "string", "false", "The default state of displaying or not admin messages of the uploader shortcode. It can be 'true' or 'false'." ),
212
+ "WFU_SUCCESSMESSAGECOLORS" => array( "Default Colors for Success Message", "string", "#006600,#EEFFEE,#006666", "The default color triplet (text, background and border colors) of success message of the uploader shortcode." ),
213
+ "WFU_WARNINGMESSAGECOLORS" => array( "Default Colors for Warning Message", "string", "#F88017,#FEF2E7,#633309", "The default color triplet (text, background and border colors) of warning message of the uploader shortcode." ),
214
+ "WFU_FAILMESSAGECOLORS" => array( "Default Colors for Fail Message", "string", "#660000,#FFEEEE,#666600", "The default color triplet (text, background and border colors) of fail message of the uploader shortcode." ),
215
+ "WFU_WAITMESSAGECOLORS" => array( "Default Colors for Wait Message", "string", "#666666,#EEEEEE,#333333", "The default color triplet (text, background and border colors) of wait message of the uploader shortcode." ),
216
+ "WFU_SHOWTARGETFOLDER" => array( "Default State for Target Folder", "string", "false", "The default state of displaying or not the target folder of the uploader shortcode. It can be 'true' or 'false'." ),
217
+ "WFU_TARGETFOLDERLABEL" => array( "Default Text for Target Folder Label", "string", "Upload Directory", "The default text of the target folder label of the uploader shortcode." ),
218
+ "WFU_ASKFORSUBFOLDERS" => array( "Default Subfolders State", "string", "false", "The default state of displaying or not a list of subfolders of the uploader shortcode. It can be 'true' or 'false'." ),
219
+ "WFU_SUBFOLDERLABEL" => array( "Default Text of Subfolders Label", "string", "Select Subfolder", "The default text of subfolders label of the uploader shortcode." ),
220
+ "WFU_SUBFOLDERTREE" => array( "Default Subfolders List", "string", "", "The default list of subfolders of the uploader shortcode. Check plugin's support page for syntax." ),
221
+ "WFU_FORCECLASSIC" => array( "Default Disable AJAX State", "string", "false", "The default state of disabling or not AJAX functionality of the uploader shortcode. It can be 'true' or 'false'." ),
222
+ "WFU_TESTMODE" => array( "Default Test Mode State", "string", "false", "The default state of test mode of the uploader shortcode. It can be 'true' or 'false'." ),
223
+ "WFU_DEBUGMODE" => array( "Default Debug Mode State", "string", "false", "The default state of debug mode of the uploader shortcode. It can be 'true' or 'false'." ),
224
+ "WFU_WIDTHS" => array( "Default Element Widths", "string", "", "The default widths of the elements of the uploader shortcode. It is a comma-separated list of element widths." ),
225
+ "WFU_HEIGHTS" => array( "Default Element Heights", "string", "", "The default heights of the elements of the uploader shortcode. It is a comma-separated list of element heights." ),
226
+ "WFU_PLACEMENTS" => array( "Default Element Placements", "string", "title/filename+selectbutton+uploadbutton/subfolders"."/userdata"."/message", "The default placements of the elements of the uploader shortcode. Check plugin's support page for syntax." ),
227
+ "WFU_USERDATA" => array( "Default User Fields State", "string", "false", "The default state of custom user fields of the uploader shortcode. It can be 'true' or 'false'." ),
228
+ "WFU_MEDIALINK" => array( "Default Add to Media State", "string", "false", "The default state for adding files to Media of the uploader shortcode. It can be 'true' or 'false'." ),
229
+ "WFU_POSTLINK" => array( "Default Attachment to Post State", "string", "false", "The default state for attaching files to current post of the uploader shortcode. It can be 'true' or 'false'." )
230
+ );
231
  //other plugin values
232
+ $GLOBALS["WFU_GLOBALS"] += array(
233
+ "WFU_PHP_ARRAY_MAXLEN" => array( "Max PHP Array Length", "string", "10000", "The maximum allowable number of items of a PHP array." ),
234
+ "WFU_HISTORYLOG_TABLE_MAXROWS" => array( "History Log Table Rows Per Page", "integer", 25, "The number of rows per page of the History Log table." )
235
+ );
236
  //color definitions
237
+ $GLOBALS["WFU_GLOBALS"] += array(
238
+ "WFU_TESTMESSAGECOLORS" => array( "Colors for Message in Test Mode", "string", "#666666,#EEEEEE,#333333", "The color triplet (text, background and border colors) of message in Test mode of the uploader shortcode." ),
239
+ "WFU_DEFAULTMESSAGECOLORS" => array( "Defaults Message Colors", "string", "#666666,#EEEEEE,#333333", "The default color triplet (text, background and border colors) of message of the uploader shortcode." ),
240
+ "WFU_HEADERMESSAGECOLORS_STATE0" => array( "State 0 Message Colors", "string", "#666666,#EEEEEE,#333333", "The color triplet (text, background and border colors) of message of upload state 0 (upload in progress with no messages) of the uploader shortcode." ),
241
+ "WFU_HEADERMESSAGECOLORS_STATE1" => array( "State 1 Message Colors", "string", "#F88017,#FEF2E7,#633309", "The color triplet (text, background and border colors) of message of upload state 1 (upload in progress with messages) of the uploader shortcode." ),
242
+ "WFU_HEADERMESSAGECOLORS_STATE2" => array( "State 2 Message Colors", "string", "#660000,#FFEEEE,#666600", "The color triplet (text, background and border colors) of message of upload state 2 (upload in progress with some files not uploaded) of the uploader shortcode." ),
243
+ "WFU_HEADERMESSAGECOLORS_STATE3" => array( "State 3 Message Colors", "string", "#660000,#FFEEEE,#666600", "The color triplet (text, background and border colors) of message of upload state 3 (upload in progress with no files uploaded so far) of the uploader shortcode." ),
244
+ "WFU_HEADERMESSAGECOLORS_STATE4" => array( "State 4 Message Colors", "string", "#006600,#EEFFEE,#006666", "The color triplet (text, background and border colors) of message of upload state 4 (all files uploaded) of the uploader shortcode." ),
245
+ "WFU_HEADERMESSAGECOLORS_STATE5" => array( "State 5 Message Colors", "string", "#F88017,#FEF2E7,#633309", "The color triplet (text, background and border colors) of message of upload state 5 (all files uploaded with messages) of the uploader shortcode." ),
246
+ "WFU_HEADERMESSAGECOLORS_STATE6" => array( "State 6 Message Colors", "string", "#660000,#FFEEEE,#666600", "The color triplet (text, background and border colors) of message of upload state 6 (some files not uploaded) of the uploader shortcode." ),
247
+ "WFU_HEADERMESSAGECOLORS_STATE7" => array( "State 7 Message Colors", "string", "#660000,#FFEEEE,#666600", "The color triplet (text, background and border colors) of message of upload state 7 (no files uploaded) of the uploader shortcode." ),
248
+ "WFU_HEADERMESSAGECOLORS_STATE8" => array( "State 8 Message Colors", "string", "#660000,#FFEEEE,#666600", "The color triplet (text, background and border colors) of message of upload state 8 (there are no files to upload) of the uploader shortcode." ),
249
+ "WFU_HEADERMESSAGECOLORS_STATE9" => array( "State 9 Message Colors", "string", "#666666,#EEEEEE,#333333", "The color triplet (text, background and border colors) of message of upload state 9 (test state) of the uploader shortcode." ),
250
+ "WFU_HEADERMESSAGECOLORS_STATE10" => array( "State 10 Message Colors", "string", "#F88017,#FEF2E7,#633309", "The color triplet (text, background and border colors) of message of upload state 10 (JSON parse error) of the uploader shortcode." ),
251
+ "WFU_HEADERMESSAGECOLORS_STATE11" => array( "State 11 Message Colors", "string", "#666666,#EEEEEE,#333333", "The color triplet (text, background and border colors) of message of upload state 11 (redirecting) of the uploader shortcode." ),
252
+ "WFU_HEADERMESSAGECOLORS_STATE12" => array( "State 12 Message Colors", "string", "#660000,#FFEEEE,#666600", "The color triplet (text, background and border colors) of message of upload state 12 (upload failed) of the uploader shortcode." )
253
+ );
254
+ //insert saved values to array
255
+ $envars = get_option("wfu_environment_variables", array());
256
+ foreach ( $GLOBALS["WFU_GLOBALS"] as $ind => $envar ) {
257
+ if ( isset($envars[$ind]) ) {
258
+ if ( $envar[1] == "integer" ) $saved = (int)$envars[$ind];
259
+ else $saved = (string)$envars[$ind];
260
+ }
261
+ else $saved = $envar[2];
262
+ array_splice($GLOBALS["WFU_GLOBALS"][$ind], 3, 0, array( $saved ));
263
+ }
264
 
265
  /************** Constant Values ***************/
266
  //other plugin values
267
+ DEFINE("WFU_SUCCESSMESSAGECOLOR", "green");
268
+ DEFINE("WFU_MAX_TIME_LIMIT", ini_get("max_input_time"));
269
  DEFINE("WFU_RESPONSE_URL", $siteurl.WPFILEUPLOAD_DIR."wfu_response.php");
270
  DEFINE("WFU_AJAX_URL", $siteurl."/wp-admin/admin-ajax.php");
271
  DEFINE("WFU_SERVICES_SERVER_URL", 'https://services2.iptanus.com');
305
  "jsonparse_headermessage" => WFU_ERROR_JSONPARSE_HEADERMESSAGE,
306
  "jsonparse_headeradminmessage" => WFU_ERROR_JSONPARSE_HEADERADMINMESSAGE,
307
  "same_pluginid" => WFU_ERROR_SAME_PLUGINID,
308
+ "default_colors" => WFU_VAR("WFU_DEFAULTMESSAGECOLORS"),
309
+ "fail_colors" => WFU_VAR("WFU_FAILMESSAGECOLORS"),
310
  "max_time_limit" => WFU_MAX_TIME_LIMIT,
311
  "response_url" => WFU_RESPONSE_URL,
312
  "ajax_url" => WFU_AJAX_URL,
lib/wfu_functions.php CHANGED
@@ -319,6 +319,11 @@ function wfu_decode_plugin_options($encoded_options) {
319
  return $plugin_options;
320
  }
321
 
 
 
 
 
 
322
  function wfu_get_plugin_version() {
323
  $plugin_data = get_plugin_data(WPFILEUPLOAD_PLUGINFILE);
324
  return $plugin_data['Version'];
319
  return $plugin_options;
320
  }
321
 
322
+ function WFU_VAR($varname) {
323
+ if ( !isset($GLOBALS["WFU_GLOBALS"][$varname]) ) return false;
324
+ return $GLOBALS["WFU_GLOBALS"][$varname][3];
325
+ }
326
+
327
  function wfu_get_plugin_version() {
328
  $plugin_data = get_plugin_data(WPFILEUPLOAD_PLUGINFILE);
329
  return $plugin_data['Version'];
lib/wfu_message.php CHANGED
@@ -2,35 +2,35 @@
2
 
3
  function wfu_prepare_message_block_skeleton($sid, $styles, $test) {
4
  /* Prepare header styles for all upload states */
5
- $header_styles["State0"] = wfu_prepare_message_colors(WFU_HEADERMESSAGECOLORS_STATE0);
6
  $header_styles["State0"]['message'] = WFU_UPLOAD_STATE0;
7
- $header_styles["State1"] = wfu_prepare_message_colors(WFU_HEADERMESSAGECOLORS_STATE1);
8
  $header_styles["State1"]['message'] = WFU_UPLOAD_STATE1;
9
- $header_styles["State2"] = wfu_prepare_message_colors(WFU_HEADERMESSAGECOLORS_STATE2);
10
  $header_styles["State2"]['message'] = WFU_UPLOAD_STATE2;
11
- $header_styles["State3"] = wfu_prepare_message_colors(WFU_HEADERMESSAGECOLORS_STATE3);
12
  $header_styles["State3"]['message'] = WFU_UPLOAD_STATE3;
13
- $header_styles["State4"] = wfu_prepare_message_colors(WFU_HEADERMESSAGECOLORS_STATE4);
14
  $header_styles["State4"]['message'] = WFU_UPLOAD_STATE4;
15
- $header_styles["State5"] = wfu_prepare_message_colors(WFU_HEADERMESSAGECOLORS_STATE5);
16
  $header_styles["State5"]['message'] = WFU_UPLOAD_STATE5;
17
- $header_styles["State5_singlefile"] = wfu_prepare_message_colors(WFU_HEADERMESSAGECOLORS_STATE5);
18
  $header_styles["State5_singlefile"]['message'] = WFU_UPLOAD_STATE5_SINGLEFILE;
19
- $header_styles["State6"] = wfu_prepare_message_colors(WFU_HEADERMESSAGECOLORS_STATE6);
20
  $header_styles["State6"]['message'] = WFU_UPLOAD_STATE6;
21
- $header_styles["State7"] = wfu_prepare_message_colors(WFU_HEADERMESSAGECOLORS_STATE7);
22
  $header_styles["State7"]['message'] = WFU_UPLOAD_STATE7;
23
- $header_styles["State7_singlefile"] = wfu_prepare_message_colors(WFU_HEADERMESSAGECOLORS_STATE7);
24
  $header_styles["State7_singlefile"]['message'] = WFU_UPLOAD_STATE7_SINGLEFILE;
25
- $header_styles["State8"] = wfu_prepare_message_colors(WFU_HEADERMESSAGECOLORS_STATE8);
26
  $header_styles["State8"]['message'] = WFU_UPLOAD_STATE8;
27
- $header_styles["State9"] = wfu_prepare_message_colors(WFU_HEADERMESSAGECOLORS_STATE9);
28
  $header_styles["State9"]['message'] = WFU_UPLOAD_STATE9;
29
- $header_styles["State10"] = wfu_prepare_message_colors(WFU_HEADERMESSAGECOLORS_STATE10);
30
  $header_styles["State10"]['message'] = WFU_UPLOAD_STATE10;
31
- $header_styles["State11"] = wfu_prepare_message_colors(WFU_HEADERMESSAGECOLORS_STATE11);
32
  $header_styles["State11"]['message'] = WFU_UPLOAD_STATE11;
33
- $header_styles["State12"] = wfu_prepare_message_colors(WFU_HEADERMESSAGECOLORS_STATE12);
34
  $header_styles["State12"]['message'] = WFU_UPLOAD_STATE12;
35
  $ExposedStateIndex = array("0", "1", "2", "3", "4", "5", "5_singlefile", "6", "7", "7_singlefile", "8", "11", "12");
36
 
@@ -67,7 +67,7 @@ function wfu_prepare_message_block_skeleton($sid, $styles, $test) {
67
  $file_count = ( $test ? 2 : 1);
68
  for ($ii = 1; $ii <= $file_count; $ii++) {
69
  if ( $test ) {
70
- $file_props = wfu_prepare_message_colors(WFU_TESTMESSAGECOLORS);
71
  $file_id = $ii;
72
  $filenumber_display = "";
73
  $fileheader_color = $file_props['color'];
2
 
3
  function wfu_prepare_message_block_skeleton($sid, $styles, $test) {
4
  /* Prepare header styles for all upload states */
5
+ $header_styles["State0"] = wfu_prepare_message_colors(WFU_VAR("WFU_HEADERMESSAGECOLORS_STATE0"));
6
  $header_styles["State0"]['message'] = WFU_UPLOAD_STATE0;
7
+ $header_styles["State1"] = wfu_prepare_message_colors(WFU_VAR("WFU_HEADERMESSAGECOLORS_STATE1"));
8
  $header_styles["State1"]['message'] = WFU_UPLOAD_STATE1;
9
+ $header_styles["State2"] = wfu_prepare_message_colors(WFU_VAR("WFU_HEADERMESSAGECOLORS_STATE2"));
10
  $header_styles["State2"]['message'] = WFU_UPLOAD_STATE2;
11
+ $header_styles["State3"] = wfu_prepare_message_colors(WFU_VAR("WFU_HEADERMESSAGECOLORS_STATE3"));
12
  $header_styles["State3"]['message'] = WFU_UPLOAD_STATE3;
13
+ $header_styles["State4"] = wfu_prepare_message_colors(WFU_VAR("WFU_HEADERMESSAGECOLORS_STATE4"));
14
  $header_styles["State4"]['message'] = WFU_UPLOAD_STATE4;
15
+ $header_styles["State5"] = wfu_prepare_message_colors(WFU_VAR("WFU_HEADERMESSAGECOLORS_STATE5"));
16
  $header_styles["State5"]['message'] = WFU_UPLOAD_STATE5;
17
+ $header_styles["State5_singlefile"] = wfu_prepare_message_colors(WFU_VAR("WFU_HEADERMESSAGECOLORS_STATE5"));
18
  $header_styles["State5_singlefile"]['message'] = WFU_UPLOAD_STATE5_SINGLEFILE;
19
+ $header_styles["State6"] = wfu_prepare_message_colors(WFU_VAR("WFU_HEADERMESSAGECOLORS_STATE6"));
20
  $header_styles["State6"]['message'] = WFU_UPLOAD_STATE6;
21
+ $header_styles["State7"] = wfu_prepare_message_colors(WFU_VAR("WFU_HEADERMESSAGECOLORS_STATE7"));
22
  $header_styles["State7"]['message'] = WFU_UPLOAD_STATE7;
23
+ $header_styles["State7_singlefile"] = wfu_prepare_message_colors(WFU_VAR("WFU_HEADERMESSAGECOLORS_STATE7"));
24
  $header_styles["State7_singlefile"]['message'] = WFU_UPLOAD_STATE7_SINGLEFILE;
25
+ $header_styles["State8"] = wfu_prepare_message_colors(WFU_VAR("WFU_HEADERMESSAGECOLORS_STATE8"));
26
  $header_styles["State8"]['message'] = WFU_UPLOAD_STATE8;
27
+ $header_styles["State9"] = wfu_prepare_message_colors(WFU_VAR("WFU_HEADERMESSAGECOLORS_STATE9"));
28
  $header_styles["State9"]['message'] = WFU_UPLOAD_STATE9;
29
+ $header_styles["State10"] = wfu_prepare_message_colors(WFU_VAR("WFU_HEADERMESSAGECOLORS_STATE10"));
30
  $header_styles["State10"]['message'] = WFU_UPLOAD_STATE10;
31
+ $header_styles["State11"] = wfu_prepare_message_colors(WFU_VAR("WFU_HEADERMESSAGECOLORS_STATE11"));
32
  $header_styles["State11"]['message'] = WFU_UPLOAD_STATE11;
33
+ $header_styles["State12"] = wfu_prepare_message_colors(WFU_VAR("WFU_HEADERMESSAGECOLORS_STATE12"));
34
  $header_styles["State12"]['message'] = WFU_UPLOAD_STATE12;
35
  $ExposedStateIndex = array("0", "1", "2", "3", "4", "5", "5_singlefile", "6", "7", "7_singlefile", "8", "11", "12");
36
 
67
  $file_count = ( $test ? 2 : 1);
68
  for ($ii = 1; $ii <= $file_count; $ii++) {
69
  if ( $test ) {
70
+ $file_props = wfu_prepare_message_colors(WFU_VAR("WFU_TESTMESSAGECOLORS"));
71
  $file_id = $ii;
72
  $filenumber_display = "";
73
  $fileheader_color = $file_props['color'];
lib/wfu_processfiles.php CHANGED
@@ -25,7 +25,7 @@ function wfu_process_files($params, $method) {
25
  $success_count = 0;
26
  $warning_count = 0;
27
  $error_count = 0;
28
- $default_colors = wfu_prepare_message_colors(WFU_DEFAULTMESSAGECOLORS);
29
  $notify_only_filename_list = "";
30
  $notify_target_path_list = "";
31
  $notify_attachment_list = "";
@@ -727,7 +727,7 @@ function wfu_process_files($params, $method) {
727
  else $params_output_array["general"]['state'] = 8;
728
 
729
  /* construct safe output */
730
- $sout = $params_output_array["general"]['state'].";".WFU_DEFAULTMESSAGECOLORS.";".$files_count;
731
  for ($i = 0; $i < $files_count; $i++) {
732
  $sout .= ";".wfu_plugin_encode_string($file_output['message_type']);
733
  $sout .= ",".wfu_plugin_encode_string($file_output['header']);
25
  $success_count = 0;
26
  $warning_count = 0;
27
  $error_count = 0;
28
+ $default_colors = wfu_prepare_message_colors(WFU_VAR("WFU_DEFAULTMESSAGECOLORS"));
29
  $notify_only_filename_list = "";
30
  $notify_target_path_list = "";
31
  $notify_attachment_list = "";
727
  else $params_output_array["general"]['state'] = 8;
728
 
729
  /* construct safe output */
730
+ $sout = $params_output_array["general"]['state'].";".WFU_VAR("WFU_DEFAULTMESSAGECOLORS").";".$files_count;
731
  for ($i = 0; $i < $files_count; $i++) {
732
  $sout .= ";".wfu_plugin_encode_string($file_output['message_type']);
733
  $sout .= ",".wfu_plugin_encode_string($file_output['header']);
readme.txt CHANGED
@@ -132,6 +132,9 @@ There is an option in plugin's settings in Dashboard to relax the CSS rules, so
132
 
133
  == Changelog ==
134
 
 
 
 
135
  = 3.7.0 =
136
  * significant code modifications to make the plugin pluggable, invisible to users
137
  * addition of before and after upload filters
@@ -542,6 +545,9 @@ Initial version.
542
 
543
  == Upgrade Notice ==
544
 
 
 
 
545
  = 3.7.0 =
546
  Upgrade to introduce some new features and fix some minor bugs.
547
 
132
 
133
  == Changelog ==
134
 
135
+ = 3.7.1 =
136
+ * internal code modifications and slight bug corrections
137
+
138
  = 3.7.0 =
139
  * significant code modifications to make the plugin pluggable, invisible to users
140
  * addition of before and after upload filters
545
 
546
  == Upgrade Notice ==
547
 
548
+ = 3.7.1 =
549
+ Upgrade to fix some minor bugs.
550
+
551
  = 3.7.0 =
552
  Upgrade to introduce some new features and fix some minor bugs.
553
 
release_notes.txt CHANGED
@@ -1 +1 @@
1
- <!-- --><span><strong>Latest release notes: </strong>This release introduces some minor bug fixes and <strong>two new filters</strong> for executing custom code before and after the upload. Furthermore, many code modifications have been done in several parts of the plugin, which are not visible to the users. These modifications will eventually make the plugin <strong>pluggable</strong>, meaning that it will be able to accept extensions. You can find more details in the Release Notes area of the plugin's </span><a href="http://www.iptanus.com/wordpress-plugins/wordpress-file-upload/">support page</a><span>.</span><!-- --><!-- -->
1
+ <!-- --><span><strong>Latest release notes: </strong>This release contains some code improvements and slight bug fixes not visible to users. You can find more details in the Release Notes area of the plugin's </span><a href="http://www.iptanus.com/wordpress-plugins/wordpress-file-upload/">support page</a><span>.</span><!-- --><!-- -->
wordpress_file_upload.php CHANGED
@@ -4,7 +4,7 @@ if( !session_id() ) { session_start(); }
4
  /*
5
  Plugin URI: http://www.iptanus.com/support/wordpress-file-upload
6
  Description: Simple interface to upload files from a page.
7
- Version: 3.7.0
8
  Author: Nickolas Bossinas
9
  Author URI: http://www.iptanus.com
10
  */
@@ -76,6 +76,7 @@ add_action('wp_ajax_wfu_ajax_action_download_file_monitor', 'wfu_ajax_action_dow
76
  add_action('wp_ajax_nopriv_wfu_ajax_action_download_file_monitor', 'wfu_ajax_action_download_file_monitor');
77
  add_action('wp_ajax_wfu_ajax_action_edit_shortcode', 'wfu_ajax_action_edit_shortcode');
78
  add_action('wp_ajax_wfu_ajax_action_get_historylog_page', 'wfu_ajax_action_get_historylog_page');
 
79
  wfu_include_lib();
80
  //widget
81
  add_action( 'widgets_init', 'register_wfu_widget' );
4
  /*
5
  Plugin URI: http://www.iptanus.com/support/wordpress-file-upload
6
  Description: Simple interface to upload files from a page.
7
+ Version: 3.7.1
8
  Author: Nickolas Bossinas
9
  Author URI: http://www.iptanus.com
10
  */
76
  add_action('wp_ajax_nopriv_wfu_ajax_action_download_file_monitor', 'wfu_ajax_action_download_file_monitor');
77
  add_action('wp_ajax_wfu_ajax_action_edit_shortcode', 'wfu_ajax_action_edit_shortcode');
78
  add_action('wp_ajax_wfu_ajax_action_get_historylog_page', 'wfu_ajax_action_get_historylog_page');
79
+ add_action('wp_ajax_wfu_ajax_action_update_envar', 'wfu_ajax_action_update_envar');
80
  wfu_include_lib();
81
  //widget
82
  add_action( 'widgets_init', 'register_wfu_widget' );