Changeset 3450209
- Timestamp:
- 01/30/2026 08:13:02 AM (3 weeks ago)
- Location:
- drag-and-drop-multiple-file-upload-contact-form-7
- Files:
-
- 33 added
- 5 edited
-
tags/1.3.9.4 (added)
-
tags/1.3.9.4/admin (added)
-
tags/1.3.9.4/admin/form-generator-v1.php (added)
-
tags/1.3.9.4/admin/form-generator-v2.php (added)
-
tags/1.3.9.4/assets (added)
-
tags/1.3.9.4/assets/css (added)
-
tags/1.3.9.4/assets/css/dnd-upload-cf7.css (added)
-
tags/1.3.9.4/assets/images (added)
-
tags/1.3.9.4/assets/js (added)
-
tags/1.3.9.4/assets/js/codedropz-uploader-jquery.js (added)
-
tags/1.3.9.4/assets/js/codedropz-uploader-min.js (added)
-
tags/1.3.9.4/assets/js/dev (added)
-
tags/1.3.9.4/assets/js/dev/jquery-dev.js (added)
-
tags/1.3.9.4/assets/js/dev/native-dev.js (added)
-
tags/1.3.9.4/drag-n-drop-upload-cf7.php (added)
-
tags/1.3.9.4/inc (added)
-
tags/1.3.9.4/inc/dnd-mime-types.php (added)
-
tags/1.3.9.4/inc/dnd-upload-cf7.php (added)
-
tags/1.3.9.4/languages (added)
-
tags/1.3.9.4/languages/drag-and-drop-multiple-file-upload-contact-form-7-de_DE.mo (added)
-
tags/1.3.9.4/languages/drag-and-drop-multiple-file-upload-contact-form-7-de_DE.po (added)
-
tags/1.3.9.4/languages/drag-and-drop-multiple-file-upload-contact-form-7-fr_FR.mo (added)
-
tags/1.3.9.4/languages/drag-and-drop-multiple-file-upload-contact-form-7-fr_FR.po (added)
-
tags/1.3.9.4/languages/drag-and-drop-multiple-file-upload-contact-form-7-ko_KR.mo (added)
-
tags/1.3.9.4/languages/drag-and-drop-multiple-file-upload-contact-form-7-ko_KR.po (added)
-
tags/1.3.9.4/languages/drag-and-drop-multiple-file-upload-contact-form-7-nl_NL.mo (added)
-
tags/1.3.9.4/languages/drag-and-drop-multiple-file-upload-contact-form-7-nl_NL.po (added)
-
tags/1.3.9.4/languages/drag-and-drop-multiple-file-upload-contact-form-7-ru_RU.mo (added)
-
tags/1.3.9.4/languages/drag-and-drop-multiple-file-upload-contact-form-7-ru_RU.po (added)
-
tags/1.3.9.4/languages/drag-and-drop-multiple-file-upload-contact-form-7-zh_TW.mo (added)
-
tags/1.3.9.4/languages/drag-and-drop-multiple-file-upload-contact-form-7-zh_TW.po (added)
-
tags/1.3.9.4/readme.txt (added)
-
tags/1.3.9.4/uninstall.php (added)
-
trunk/admin/form-generator-v2.php (modified) (2 diffs)
-
trunk/assets/js/dev/native-dev.js (modified) (1 diff)
-
trunk/drag-n-drop-upload-cf7.php (modified) (3 diffs)
-
trunk/inc/dnd-upload-cf7.php (modified) (10 diffs)
-
trunk/readme.txt (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
drag-and-drop-multiple-file-upload-contact-form-7/trunk/admin/form-generator-v2.php
r3391555 r3450209 34 34 // Fieldname 35 35 $tgg->print( 'field_name' ); 36 37 $server_limit = wp_max_upload_size(); 38 $threshold = 50 * 1024 * 1024; // 100 MB in bytes 36 39 ?> 37 40 … … 54 57 ); 55 58 ?> 59 60 <!-- Only show if max upload size is less than 100 MB --> 61 <?php if ( $server_limit < $threshold ) : ?> 62 <br> 63 <span>Your server max upload size: <strong><?php echo size_format( $server_limit ); ?></strong>, 64 🔥 <a href="https://www.codedropz.com/drag-drop-multiple-file-upload-for-contact-form-7/" target="_blank">Pro</a> enables large uploads using chunked uploads.</span> 65 <?php endif; ?> 56 66 </label> 57 67 </fieldset> -
drag-and-drop-multiple-file-upload-contact-form-7/trunk/assets/js/dev/native-dev.js
r3391555 r3450209 245 245 var xhr = new XMLHttpRequest(); 246 246 247 // Get progress bar element 248 const progressBar = document.getElementById( progressBarID );249 const progressElement = progressBar.querySelector('.dnd-progress-bar');250 const detailsElement = progressBar.querySelector('.dnd-upload-details');251 const submitButton = form_handler.querySelector('input[type="submit"], button[type="submit"]');247 // Get progress bar element [changes 2026] 248 let progressBar = document.getElementById( progressBarID ); 249 let progressElement = progressBar.querySelector('.dnd-progress-bar'); 250 let detailsElement = progressBar.querySelector('.dnd-upload-details'); 251 let submitButton = form_handler.querySelector('input[type="submit"], button[type="submit"]'); 252 252 253 253 xhr.open(form_handler.getAttribute('method'), options.ajax_url); -
drag-and-drop-multiple-file-upload-contact-form-7/trunk/drag-n-drop-upload-cf7.php
r3428236 r3450209 7 7 * Text Domain: drag-and-drop-multiple-file-upload-contact-form-7 8 8 * Domain Path: /languages 9 * Version: 1.3.9. 39 * Version: 1.3.9.4 10 10 * Author: Glen Don L. Mongaya 11 11 * Author URI: http://codedropz.com … … 22 22 23 23 /** Define plugin Version */ 24 define( 'dnd_upload_cf7_version', '1.3.9. 3' );24 define( 'dnd_upload_cf7_version', '1.3.9.4' ); 25 25 26 26 /** Define constant Plugin Directories */ … … 32 32 } 33 33 34 // Activation setup cron. 35 register_activation_hook( __FILE__, function () { 36 if ( ! wp_next_scheduled( 'dnd_cf7_daily_event' ) ) { 37 wp_schedule_event( time(), 'hourly', 'dnd_cf7_daily_event' ); 38 } 39 }); 40 41 // Deactivate clear cron. 42 register_deactivation_hook( __FILE__, function () { 43 wp_clear_scheduled_hook( 'dnd_cf7_daily_event' ); 44 }); 45 34 46 // require plugin core file 35 47 require_once( dnd_upload_cf7_directory .'/inc/dnd-upload-cf7.php' ); -
drag-and-drop-multiple-file-upload-contact-form-7/trunk/inc/dnd-upload-cf7.php
r3428236 r3450209 17 17 add_action( 'wpcf7_init', 'dnd_cf7_upload_add_form_tag_file' ); 18 18 add_action( 'wpcf7_enqueue_scripts', 'dnd_cf7_scripts' ); 19 add_action( 'wpcf7_enqueue_scripts', 'dnd_cf7_cookie_scripts', 50 ); 19 20 20 21 // Hook on plugins loaded … … 38 39 add_action('wpcf7_mail_components','dnd_cf7_mail_components', 50, 2); 39 40 40 // Auto clean up dir/files 41 add_action(' shutdown', 'dnd_cf7_auto_clean_dir', 20, 1);41 // Auto clean up dir/files - cron schedule. 42 add_action('dnd_cf7_daily_event', 'dnd_cf7_auto_clean_dir'); 42 43 43 44 // Add row meta links … … 58 59 // Flamingo Hooks 59 60 add_action('before_delete_post', 'dnd_remove_uploaded_files'); 60 61 // Generate uqique id/random62 add_action( 'wp_footer', 'dnd_cf7_generate_cookie' );63 61 64 62 // Nonce … … 206 204 if ( is_array( $posted_data ) ) { 207 205 foreach( $posted_data[$field_name] as $key => $file ) { 208 if ( $send_link ||strpos( dirname($file), 'wpcf7-files' ) !== false ) {209 //$file = wp_basename( $file ); // remove duplicate path "/12/file.jpg" to just "/file.jpg"206 if ( strpos( dirname($file), 'wpcf7-files' ) !== false ) { 207 $file = wp_basename( $file ); // remove duplicate path "/12/file.jpg" to just "/file.jpg" 210 208 } 211 209 $posted_data[$field_name][$key] = trailingslashit( $uploads_dir['upload_url'] ) . $file; … … 294 292 // Clean up directory - From Contact Form 7 295 293 function dnd_cf7_auto_clean_dir( $dir_path = null ) { 296 if ( is_admin() ) {297 return;298 }299 294 300 295 // Disable auto delete … … 485 480 // Check if submitted and file exists then file is ready. 486 481 if ( $submission && file_exists( $new_file_name ) ) { 487 $ components['attachments'][] = $new_file_name;482 $f['attachments'][] = $new_file_name; 488 483 } 489 484 } … … 591 586 } 592 587 588 // Add inline js for cookie script. 589 function dnd_cf7_cookie_scripts() { 590 wp_add_inline_script( 'codedropz-uploader', 591 " 592 function dnd_cf7_generateUUIDv4() { 593 const bytes = new Uint8Array(16); 594 crypto.getRandomValues(bytes); 595 bytes[6] = (bytes[6] & 0x0f) | 0x40; // version 4 596 bytes[8] = (bytes[8] & 0x3f) | 0x80; // variant 10 597 const hex = Array.from(bytes, b => b.toString(16).padStart(2, '0')).join(''); 598 return hex.replace(/^(.{8})(.{4})(.{4})(.{4})(.{12})$/, '$1-$2-$3-$4-$5'); 599 } 600 601 document.addEventListener('DOMContentLoaded', function() { 602 if ( ! document.cookie.includes('wpcf7_guest_user_id')) { 603 document.cookie = 'wpcf7_guest_user_id=' + dnd_cf7_generateUUIDv4() + '; path=/; max-age=' + (12 * 3600) + '; samesite=Lax'; 604 } 605 }); 606 " 607 ); 608 } 609 593 610 // Generate tag 594 611 function dnd_cf7_upload_add_form_tag_file() { … … 1171 1188 esc_html__( '🔥 %1$sUpgrade Now%2$s for Extra Features: Explore the %3$sPro Version%4$s Today!', 'drag-and-drop-multiple-file-upload-contact-form-7' ), 1172 1189 '<span style="color:#038d03;">','</span>', 1173 '<a href="https:// codedropz.com/purchase-plugin/" target="_blank">','</a>',1190 '<a href="https://www.codedropz.com/drag-drop-multiple-file-upload-for-contact-form-7/" target="_blank">','</a>', 1174 1191 ); 1175 1192 echo ' | '; … … 1365 1382 function dnd_custom_plugin_row_meta( $links, $file ) { 1366 1383 if ( strpos( $file, 'drag-n-drop-upload-cf7.php' ) !== false ) { 1367 $new_links = array('pro-version' => '<a href="https:// codedropz.com/purchase-plugin/" target="_blank" style="font-weight:bold; color:#f4a647;">Pro Version</a>');1384 $new_links = array('pro-version' => '<a href="https://www.codedropz.com/drag-drop-multiple-file-upload-for-contact-form-7/" target="_blank" style="font-weight:bold; color:#f4a647;">Pro Version</a>'); 1368 1385 $links = array_merge( $links, $new_links ); 1369 1386 } … … 1407 1424 1408 1425 return $default_value; 1426 } 1427 1428 function dnd_cf7_max_upload() { 1429 $max = wp_max_upload_size(); 1430 $max_mb = $max / 1024 / 1024; 1431 1432 if ( $max_mb > 1024 ) { 1433 return round( $max_mb / 1024, 2 ) . ' GB'; 1434 } 1435 1436 return round( $max_mb, 2 ) . ' MB'; 1409 1437 } 1410 1438 -
drag-and-drop-multiple-file-upload-contact-form-7/trunk/readme.txt
r3428236 r3450209 5 5 Requires at least: 3.0.1 6 6 Tested up to: 6.9 7 Stable tag: 1.3.9. 37 Stable tag: 1.3.9.4 8 8 Requires PHP: 5.2.4 9 9 License: GPLv2 or later … … 48 48 ### ⭐ Premium Features ⭐ 49 49 50 Check out the available features in the **PRO version**.50 Check out the available features in the [**PRO version**](https://www.codedropz.com/drag-drop-multiple-file-upload-for-contact-form-7/#shop). 51 51 52 52 1. **Upload Large File** - Supports uploading large files. … … 86 86 * Advanced Contact form 7 DB – Vsourz Digital 87 87 88 You can get [PRO Version here](https://www.codedropz.com/ purchase-plugin/)!88 You can get [PRO Version here](https://www.codedropz.com/drag-drop-multiple-file-upload-for-contact-form-7/#shop)! 89 89 90 90 **PRO VERSION - PLUGIN OVERVIEW** … … 183 183 == Changelog == 184 184 185 = 1.3.9.4 = 186 - Fixes: Change shutdown hook to cron events in order to fix this issue. [Support Link](https://wordpress.org/support/topic/commands-out-of-sync-mysql-error-during-shutdown-hook-v1-3-9-3-2/) 187 - Fixes: Move the js cookie generation from wp_footer hook to wp_add_inline_script. [Support Link](https://wordpress.org/support/topic/enqueueing-of-javascript-is-not-complaint-csp-conflict/) 188 - Improvement: Minor fixes and improvement. 189 185 190 = 1.3.9.3 = 186 191 - Security: Fixed vulnerability issues reported by WordFence (reported by shark3y) - unauthorized modification of data due to a missing ownership check in the dnd_codedropz_upload_delete() function. … … 263 268 = 1.2.4 = 264 269 Added new features and fixes. 265 266 == Donations ==267 268 Would you like to support the advancement of this plugin? [Donate](http://codedropz.com/donation)
Note: See TracChangeset
for help on using the changeset viewer.