Changeset 3249887
- Timestamp:
- 03/03/2025 06:27:58 PM (11 months ago)
- Location:
- hypertransfer/trunk
- Files:
-
- 4 edited
-
assets/admin.php (modified) (3 diffs)
-
assets/hypertransfer.js (modified) (1 diff)
-
hypertransfer.php (modified) (3 diffs)
-
readme.txt (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
hypertransfer/trunk/assets/admin.php
r3246045 r3249887 57 57 58 58 if ($ListaRecords) { 59 echo '<table class="wp-list-table widefat">';59 echo '<table id="fileTable" class="wp-list-table widefat">'; 60 60 echo '<thead ><tr>'; 61 echo '<th >File</th>';62 echo '<th class="centrato">Size Mb</th>';61 echo '<th onclick="HPTR_sortTable(0)">File</th>'; 62 echo '<th onclick="HPTR_sortTable(1)" class="centrato">Size Mb</th>'; 63 63 do_action('HPTR_ACT_add_pro_row_head'); 64 64 echo '<th class="centrato">Copy<br>Rapid link</th>'; 65 65 echo '<th class="centrato">Action</th>'; 66 66 echo '<th class="centrato">Downloaded<br>times</th>'; 67 echo '<th class="centrato">Upload<br>date</th>';67 echo '<th onclick="HPTR_sortTable(7)" class="centrato">Upload<br>date</th>'; 68 68 echo '</tr></thead>'; 69 69 echo '<tbody>'; … … 135 135 136 136 137 138 139 137 // Lista dei file registrati nella tabella option e quindi presenti nella cartella VERSIONE API WP 140 function HPTR_items_files_list() { 138 139 function HPTR_items_files_list($order_by = 'date', $order = 'DESC') { 141 140 // Ottieni tutte le opzioni 142 141 $all_options = wp_load_alloptions(); … … 148 147 $filtered_options[$key] = maybe_unserialize($value); 149 148 } 150 151 } 152 149 } 150 151 // Ordina l'array in base alla chiave specificata mantenendo le chiavi originali 152 uasort($filtered_options, function ($a, $b) use ($order_by, $order) { 153 $valA = isset($a[$order_by]) ? $a[$order_by] : null; 154 $valB = isset($b[$order_by]) ? $b[$order_by] : null; 155 156 if ($valA == $valB) { 157 return 0; 158 } 159 160 return ($order === 'ASC') ? ($valA <=> $valB) : ($valB <=> $valA); 161 }); 153 162 154 163 return $filtered_options; -
hypertransfer/trunk/assets/hypertransfer.js
r3246045 r3249887 370 370 371 371 } 372 373 374 function HPTR_sortTable(columnIndex) { 375 // 376 } -
hypertransfer/trunk/hypertransfer.php
r3246045 r3249887 5 5 * License: GPL v2 or later 6 6 * Description: This plugin is used for the rapid and easy transfer of files, stored on your web space, via links. Valid alternative to file transfer sites, with the advantage of having no transfer deadline, the files are stored on your private web space and customers will be able to visit the website via the download page. 7 * Version: 1.0. 197 * Version: 1.0.20 8 8 * Requires at least: 6.3 9 9 * Requires PHP: 7.4 … … 22 22 23 23 // Definisce la directory e variabili globali 24 define('HYPERTRANSFER_THIS_VERSION', '1.0.19'); // *** Aggiornare come sopra *** // 24 25 26 define('HYPERTRANSFER_PRO_MIN', '1.0.19'); // Versione Pro Minima per funzionare con questa versione BASE 27 25 28 define('HYPERTRANSFER_UPLOAD_DIR', wp_upload_dir()['basedir'] . '/HyperTransferFile/'); 26 29 define('HYPERTRANSFER_UPLOAD_URL', wp_upload_dir()['baseurl'] . '/HyperTransferFile/'); 27 30 define('HYPERTRANSFER_DIR', __FILE__); 28 31 define('HYPERTRANSFER_URL', plugin_dir_url(__FILE__)); 32 define('HYPERTRANSFER_THIS_VERSION', HPTR_this_plugin_ver()); // prende dall'header di questo file la versione corrente 33 29 34 30 35 // opzionie di compressione definite per riusarle più avanti … … 35 40 $Post_Upload_Compress = false; 36 41 } 37 42 // funzione per leggere la versione dal header 43 function HPTR_this_plugin_ver() { 44 // Set the file path to a variable. 45 $file_path = HYPERTRANSFER_DIR; 46 // Read the version number from the main plugin file then set it to a variable. 47 $plugin_data = get_file_data( $file_path, array( 48 'Version' => 'Version' 49 ) ); 50 51 if ( !empty( $plugin_data['Version'] ) ) { 52 // The the value of the Version header to a variable. 53 return $plugin_data['Version']; 54 } 55 } 38 56 39 57 // carica JS e CSS 40 58 function HPTR_assets() { 41 59 42 wp_register_script( 'HyperTransferScript', plugin_dir_url(__FILE__) .'assets/hypertransfer.js', array( 'jquery' ), '1.0. 19', true);43 wp_register_style( 'HyperTransferStyle', plugin_dir_url(__FILE__) .'assets/hypertransfer.css', array(), '1.0. 19' );60 wp_register_script( 'HyperTransferScript', plugin_dir_url(__FILE__) .'assets/hypertransfer.js', array( 'jquery' ), '1.0.20', true); 61 wp_register_style( 'HyperTransferStyle', plugin_dir_url(__FILE__) .'assets/hypertransfer.css', array(), '1.0.20' ); 44 62 45 63 wp_enqueue_style( 'HyperTransferStyle'); -
hypertransfer/trunk/readme.txt
r3246045 r3249887 3 3 Tags: file, transfer, sender, share, wp transfer 4 4 Tested up to: 6.7 5 Stable tag: 1.0. 195 Stable tag: 1.0.20 6 6 Requires PHP: 7.4 7 7 License: GPLv2 … … 60 60 * Initial release 61 61 62 == Upgrade Notice ==63 64 = 1.0.17 =65 Just released into the wild.66 67 62 = 1.0.18 = 68 63 Fix page 404 if no key is defined in the "hypertransfer" url … … 71 66 = 1.0.19 = 72 67 Improved file deletion control. 68 69 = 1.0.20 = 70 Add version var to check PRO compatibility. 71 73 72 74 73 == Language ==
Note: See TracChangeset
for help on using the changeset viewer.