WordPress File Upload - Version 3.1.1

Version Description

  • the previous version broke the easy creation of shortcodes through the plugin's settings in Dashboard and it has been corrected, together with some improvements
Download this release

Release Info

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

Code changes from version 3.1.0 to 3.1.1

lib/wfu_admin.php CHANGED
@@ -165,7 +165,7 @@ function wordpress_file_upload_manage_dashboard() {
165
  $echo_str = wfu_manage_settings();
166
  }
167
  elseif ( $action == 'add_shortcode' && $postid != "" && $nonce != "" && $tag != "" ) {
168
- if ( $_SESSION['wfu_add_shortcode_ticket'] != $nonce ) $echo_str = wfu_manage_mainmenu();
169
  elseif ( wfu_add_shortcode($postid, $tag) ) $echo_str = wfu_manage_mainmenu();
170
  else $echo_str = wfu_manage_mainmenu(WFU_DASHBOARD_ADD_SHORTCODE_REJECTED);
171
  $_SESSION['wfu_add_shortcode_ticket'] = 'noticket';
@@ -419,7 +419,10 @@ function wfu_manage_instances_of_shortcode($tag, $title, $slug, $inc) {
419
  $addbutton_post = ( !$no_shortcodes ? '' : '<label> to get started and add the '.$slug.' in a page</label>');
420
  $echo_str .= "\n\t\t\t".$addbutton_pre.'<button onclick="document.getElementById(\'wfu_add_plugin_button_'.$inc.'\').style.display = \'none\'; document.getElementById(\'wfu_add_plugin_'.$inc.'\').style.display = \'inline-block\'; '.$onchange_js.'">'.( !$no_shortcodes ? 'Add Plugin Instance' : 'here' ).'</button>'.$addbutton_post;
421
  $echo_str .= "\n\t\t".'</div>';
422
- $echo_str .= "\n\t\t".'<div id="wfu_add_plugin_'.$inc.'" style="margin-bottom: 20px; margin-top: 10px; display:none;">';
 
 
 
423
  $echo_str .= "\n\t\t\t".'<label>Add '.$slug.' to </label><select id="wfu_page_type_'.$inc.'" onchange="document.getElementById(\'wfu_page_list_'.$inc.'\').style.display = (this.value == \'page\' ? \'inline-block\' : \'none\'); document.getElementById(\'wfu_post_list_'.$inc.'\').style.display = (this.value == \'post\' ? \'inline-block\' : \'none\'); '.$onchange_js.'"><option value="page" selected="selected">Page</option><option value="post">Post</option></select>';
424
  $echo_str .= "\n\t\t\t".'<select id="wfu_page_list_'.$inc.'" style="margin-bottom:6px;" onchange="'.$onchange_js.'">';
425
  $echo_str .= "\n\t\t\t\t".'<option value=""></option>';
@@ -432,8 +435,8 @@ function wfu_manage_instances_of_shortcode($tag, $title, $slug, $inc) {
432
  $echo_str .= "\n\t\t\t\t".'<option value="'.$item['id'].'">'.str_repeat('&nbsp;', 4 * $item['level']).( $item['status'] == 1 ? '[Private]' : ( $item['status'] == 2 ? '[Draft]' : '' ) ).$item['title'].'</option>';
433
  $echo_str .= "\n\t\t\t".'</select><br />';
434
  $add_shortcode_ticket = wfu_create_random_string(16);
435
- $_SESSION['wfu_add_shortcode_ticket'] = $add_shortcode_ticket;
436
- $echo_str .= "\n\t\t".'<button id="wfu_add_plugin_ok_'.$inc.'" style="float:right; margin: 0 2px 0 4px;" disabled="disabled" onclick="document.getElementById(\'wfu_add_plugin_'.$inc.'\').style.display = \'none\'; window.location = \''.$siteurl.'/wp-admin/options-general.php?page=wordpress_file_upload&amp;action=add_shortcode&amp;tag='.$tag.'&amp;postid=\' + (document.getElementById(\'wfu_page_type_'.$inc.'\').value == \'page\' ? document.getElementById(\'wfu_page_list_'.$inc.'\').value : document.getElementById(\'wfu_post_list_'.$inc.'\').value) + \'&amp;nonce='.$add_shortcode_ticket.'\';">Ok</button>';
437
  $echo_str .= "\n\t\t".'<button style="float:right;" onclick="document.getElementById(\'wfu_page_type_'.$inc.'\').value = \'page\'; document.getElementById(\'wfu_page_list_'.$inc.'\').value = \'\'; document.getElementById(\'wfu_post_list_'.$inc.'\').value = \'\'; document.getElementById(\'wfu_add_plugin_'.$inc.'\').style.display = \'none\'; document.getElementById(\'wfu_add_plugin_button_'.$inc.'\').style.display = \'inline-block\';">Cancel</button>';
438
  $echo_str .= "\n\t\t".'</div>';
439
  $echo_str .= "\n\t\t".'<table class="widefat">';
165
  $echo_str = wfu_manage_settings();
166
  }
167
  elseif ( $action == 'add_shortcode' && $postid != "" && $nonce != "" && $tag != "" ) {
168
+ if ( $_SESSION['wfu_add_shortcode_ticket_for_'.$tag] != $nonce ) $echo_str = wfu_manage_mainmenu();
169
  elseif ( wfu_add_shortcode($postid, $tag) ) $echo_str = wfu_manage_mainmenu();
170
  else $echo_str = wfu_manage_mainmenu(WFU_DASHBOARD_ADD_SHORTCODE_REJECTED);
171
  $_SESSION['wfu_add_shortcode_ticket'] = 'noticket';
419
  $addbutton_post = ( !$no_shortcodes ? '' : '<label> to get started and add the '.$slug.' in a page</label>');
420
  $echo_str .= "\n\t\t\t".$addbutton_pre.'<button onclick="document.getElementById(\'wfu_add_plugin_button_'.$inc.'\').style.display = \'none\'; document.getElementById(\'wfu_add_plugin_'.$inc.'\').style.display = \'inline-block\'; '.$onchange_js.'">'.( !$no_shortcodes ? 'Add Plugin Instance' : 'here' ).'</button>'.$addbutton_post;
421
  $echo_str .= "\n\t\t".'</div>';
422
+ $echo_str .= "\n\t\t".'<div id="wfu_add_plugin_'.$inc.'" style="margin-bottom: 20px; margin-top: 10px; position:relative; display:none;">';
423
+ $echo_str .= "\n\t\t\t".'<div id="wfu_add_plugin_'.$inc.'_overlay" style="position:absolute; top:0; left:0; width:100%; height:100%; background-color:rgba(255,255,255,0.8); border:none; display:none;">';
424
+ $echo_str .= "\n\t\t\t\t".'<table style="background:none; border:none; margin:0; padding:0; line-height:1; border-spacing:0; width:100%; height:100%; table-layout:fixed;"><tbody><tr><td style="text-align:center; vertical-align:middle;"><div style="display:inline-block;"><span class="spinner" style="opacity:1; float:left; margin:0; display:inline;"></span><label style="margin-left:4px;">please wait...</label></div></td></tr></tbody></table>';
425
+ $echo_str .= "\n\t\t\t".'</div>';
426
  $echo_str .= "\n\t\t\t".'<label>Add '.$slug.' to </label><select id="wfu_page_type_'.$inc.'" onchange="document.getElementById(\'wfu_page_list_'.$inc.'\').style.display = (this.value == \'page\' ? \'inline-block\' : \'none\'); document.getElementById(\'wfu_post_list_'.$inc.'\').style.display = (this.value == \'post\' ? \'inline-block\' : \'none\'); '.$onchange_js.'"><option value="page" selected="selected">Page</option><option value="post">Post</option></select>';
427
  $echo_str .= "\n\t\t\t".'<select id="wfu_page_list_'.$inc.'" style="margin-bottom:6px;" onchange="'.$onchange_js.'">';
428
  $echo_str .= "\n\t\t\t\t".'<option value=""></option>';
435
  $echo_str .= "\n\t\t\t\t".'<option value="'.$item['id'].'">'.str_repeat('&nbsp;', 4 * $item['level']).( $item['status'] == 1 ? '[Private]' : ( $item['status'] == 2 ? '[Draft]' : '' ) ).$item['title'].'</option>';
436
  $echo_str .= "\n\t\t\t".'</select><br />';
437
  $add_shortcode_ticket = wfu_create_random_string(16);
438
+ $_SESSION['wfu_add_shortcode_ticket_for_'.$tag] = $add_shortcode_ticket;
439
+ $echo_str .= "\n\t\t".'<button id="wfu_add_plugin_ok_'.$inc.'" style="float:right; margin: 0 2px 0 4px;" disabled="disabled" onclick="document.getElementById(\'wfu_add_plugin_'.$inc.'_overlay\').style.display = \'block\'; window.location = \''.$siteurl.'/wp-admin/options-general.php?page=wordpress_file_upload&amp;action=add_shortcode&amp;tag='.$tag.'&amp;postid=\' + (document.getElementById(\'wfu_page_type_'.$inc.'\').value == \'page\' ? document.getElementById(\'wfu_page_list_'.$inc.'\').value : document.getElementById(\'wfu_post_list_'.$inc.'\').value) + \'&amp;nonce='.$add_shortcode_ticket.'\';">Ok</button>';
440
  $echo_str .= "\n\t\t".'<button style="float:right;" onclick="document.getElementById(\'wfu_page_type_'.$inc.'\').value = \'page\'; document.getElementById(\'wfu_page_list_'.$inc.'\').value = \'\'; document.getElementById(\'wfu_post_list_'.$inc.'\').value = \'\'; document.getElementById(\'wfu_add_plugin_'.$inc.'\').style.display = \'none\'; document.getElementById(\'wfu_add_plugin_button_'.$inc.'\').style.display = \'inline-block\';">Cancel</button>';
441
  $echo_str .= "\n\t\t".'</div>';
442
  $echo_str .= "\n\t\t".'<table class="widefat">';
readme.txt CHANGED
@@ -125,6 +125,9 @@ In the free version the upload will fail. However in the Pro version the upload
125
 
126
  == Changelog ==
127
 
 
 
 
128
  = 3.1.0 =
129
  * an important feature (front-end file browser) has been added in professional version 3.1.0
130
  * added port number support for uploads using ftp mode
@@ -451,6 +454,9 @@ Initial version.
451
 
452
  == Upgrade Notice ==
453
 
 
 
 
454
  = 3.1.0 =
455
  Upgrade to fix some minor bugs.
456
 
125
 
126
  == Changelog ==
127
 
128
+ = 3.1.1 =
129
+ * the previous version broke the easy creation of shortcodes through the plugin's settings in Dashboard and it has been corrected, together with some improvements
130
+
131
  = 3.1.0 =
132
  * an important feature (front-end file browser) has been added in professional version 3.1.0
133
  * added port number support for uploads using ftp mode
454
 
455
  == Upgrade Notice ==
456
 
457
+ = 3.1.1 =
458
+ Upgrade to fix a minor bug.
459
+
460
  = 3.1.0 =
461
  Upgrade to fix some minor bugs.
462
 
release_notes.txt CHANGED
@@ -1 +1 @@
1
- <span><strong>Latest release notes: </strong>This release introduces some minor bug fixes related to php warnings and admin browser.<!-- --> The professional version of the plugin introduces a long waiting feature, which is <strong>a front-end list of uploaded files</strong>. Either logged users or guests can view the files they have uploaded from a page or post in a table layout. For details about this feature, please check the plugin's </span><a href="http://www.iptanus.com/wordpress-plugins/wordpress-file-upload/">page</a><span>.<!-- --><!-- --></span>
1
+ <span><strong>Latest release notes: </strong>This release contains a small fix to a problem caused because of the previous important release.<br /><br /><strong>Version 3.1.0 release notes: </strong><!-- -->The professional version of the plugin introduces a long waiting feature, which is <strong>a front-end list of uploaded files</strong>. Either logged users or guests can view the files they have uploaded from a page or post in a table layout. For details about this feature, please check the plugin's </span><a href="http://www.iptanus.com/wordpress-plugins/wordpress-file-upload/">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.1.0
8
  Author: Nickolas Bossinas
9
  Author URI: http://www.iptanus.com
10
  */
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.1.1
8
  Author: Nickolas Bossinas
9
  Author URI: http://www.iptanus.com
10
  */