Changeset 3468181
- Timestamp:
- 02/24/2026 03:10:34 AM (12 days ago)
- Location:
- extended-folder-compression/tags/1.1.14
- Files:
-
- 4 copied
-
. (copied) (copied from extended-folder-compression/trunk)
-
efc_functions.php (copied) (copied from extended-folder-compression/trunk/efc_functions.php) (8 diffs)
-
icon-256x256.png (copied) (copied from extended-folder-compression/trunk/icon-256x256.png)
-
readme.txt (copied) (copied from extended-folder-compression/trunk/readme.txt) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
extended-folder-compression/tags/1.1.14/efc_functions.php
r3310749 r3468181 6 6 Author URI: https://richardlerma.com/contact/ 7 7 Requires Plugins: tiny-compress-images 8 Version: 1.1.1 28 Version: 1.1.14 9 9 Text Domain: extended-folder-compression 10 Copyright: (c) 2019-202 5rldd.net - All Rights Reserved10 Copyright: (c) 2019-2026 rldd.net - All Rights Reserved 11 11 License: GPLv3 or later 12 12 License URI: http://www.gnu.org/licenses/gpl-3.0.html … … 85 85 $default_folder=$upload_dir['basedir']; 86 86 87 if($_SERVER['REQUEST_METHOD']=='POST'&&(isset($_POST['efctin_optimize'])||isset($_POST['continue'])||isset($_POST['efctin_save_auto']) )){87 if($_SERVER['REQUEST_METHOD']=='POST'&&(isset($_POST['efctin_optimize'])||isset($_POST['continue'])||isset($_POST['efctin_save_auto'])||isset($_POST['efctin_clear_history']))){ 88 88 if(!isset($_POST['efctin_nonce'])||!wp_verify_nonce(sanitize_text_field(wp_unslash($_POST['efctin_nonce'])),'efctin_optimize')){ 89 89 echo "<div class='error notice'><p>".esc_html('Security check failed.')."</p></div>";return; 90 90 } 91 91 92 if(isset($_POST['efctin_clear_history'])){ 93 update_option('efctin_processed_images',array()); 94 update_option('efctin_log',''); 95 update_option('efctin_log_ct',0); 96 update_option('efctin_log_mb',0); 97 echo "<div class='updated notice'><p>Compression history cleared. All images will be treated as unprocessed on the next run.</p></div>"; 98 } 92 99 if(!isset($_POST['continue'])){ 93 100 $days=isset($_POST['days'])?intval(wp_unslash($_POST['days'])):30; … … 136 143 </td> 137 144 </tr> 138 </table>"; 139 submit_button('Run Optimization','primary','efctin_optimize'); 145 </table> 146 <p class='submit' style='overflow:hidden'> 147 <button type='submit' name='efctin_clear_history' class='button' style='float:right' onclick=\"return confirm('This will permanently delete all compression history. All images will be treated as new and may be recompressed on the next run. Continue?');\">Clear Compression History</button> 148 <button type='submit' name='efctin_optimize' class='button button-primary'>Run Optimization</button> 149 </p>"; 140 150 echo "</form>"; 141 151 … … 177 187 if($ct>0)echo "<div id='efctin_result'><div style='font-size:1.2em;margin-bottom:1em;font-weight:bold'>Process Complete. </div> <b>".esc_html($ct)."</b> Images Compressed. <b> ".esc_html($mb)."</b> MB Saved.\n\n".wp_kses_post($log)."</div>"; 178 188 elseif(!empty($log))echo "<div id='efctin_result'>".wp_kses_post($log)."</div>"; 179 else echo "<div id='efctin_result'>".sprintf(esc_html__('No unprocessed images modified in last %1$s days found in %2$s folder.','extended-folder-compression'),esc_html($days),esc_html($base_folder))."</div>"; 189 else{ 190 if(basename($target_folder)==='uploads')echo "<div id='efctin_result'>No images processed. This tool intentionally skips standard WordPress year folders inside /uploads. Set Target Folder to a specific year/month folder like /uploads/2026/02.</div>"; 191 else echo "<div id='efctin_result'>".sprintf(esc_html__('No unprocessed images modified in last %1$s days found in %2$s folder.','extended-folder-compression'),esc_html($days),esc_html($base_folder))."</div>"; 192 } 180 193 } 181 194 } … … 196 209 } 197 210 } 211 198 212 199 213 function efctin_compression($dir,$batch_timeout,&$processed,$start_time=null){ … … 218 232 $img=basename($path); 219 233 $relativePath="/$parent/$img"; 220 $hash=hash('crc32b',$relativePath); 234 $hash_old=hash('crc32b',$relativePath); 235 $hash=hash('crc32b',$relativePath.'|'.filesize($path)); 221 236 if(isset($processed[$hash]))continue; 237 if(isset($processed[$hash_old])){$processed[$hash]=true;continue;} 222 238 $origSize=filesize($path); 223 239 if($origSize>100){ … … 240 256 } 241 257 }else efctin_log("Permanently skipped $origSize byte file. $relativePath\n"); 258 $processed[$hash_old]=true; 242 259 $processed[$hash]=true; 243 260 flush(); … … 247 264 return true; 248 265 } 266 249 267 250 268 add_action('init',function(){ -
extended-folder-compression/tags/1.1.14/readme.txt
r3310749 r3468181 3 3 Tags: tinypng, directory, folder compression, image optimization 4 4 Requires at least: 6.0 5 Tested up to: 6. 86 Stable tag: 1.1.1 25 Tested up to: 6.9 6 Stable tag: 1.1.14 7 7 License: GNU General Public License v3.0 8 8 License URI: http://www.gnu.org/licenses/gpl-3.0.html … … 38 38 39 39 == Changelog == 40 = 1.1.14 = * Improved messaging. Added clear history functionality. Improved caching of processed images. 40 41 = 1.1.12 = * Use timezone offset for file date display 41 42 = 1.1.11 = * Improve auto compression
Note: See TracChangeset
for help on using the changeset viewer.