Changeset 1888630
- Timestamp:
- 06/07/2018 08:48:53 AM (8 years ago)
- File:
-
- 1 edited
-
dsgvo/trunk/eu-dsgvo-helper.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
dsgvo/trunk/eu-dsgvo-helper.php
r1888312 r1888630 4 4 Plugin Name: EU DSGVO Helper 5 5 Description: This Plugin will be further developed. It so far caches google webfonts locally and replaces youtube embeded videos with a preview-image which becomes an embeded video on-click. Removes Emojis. More functions will be added soon. 6 Version: 1.0.5. 46 Version: 1.0.5.5 7 7 Author: Eric Marten 8 8 Author URL: https://www.herr-marten.de/ … … 40 40 if (substr($rd,0,1)!="." && !is_dir($upload_dir.$rd) ) 41 41 { 42 if (filemtime($upload_dir.$rd)<= (time()-$expire) )42 if (filemtime($upload_dir.$rd)<= (time()-$expire) || filemtime($upload_dir.$rd)<=1528362000 ) 43 43 { 44 44 @unlink($upload_dir.$rd); … … 59 59 if (isset($match["url"])) 60 60 { 61 $dl_url=$match["url"]; 61 62 if (substr($match["url"],0,2)=="//") 62 63 { 63 $ match["url"]="https:".$match["url"];64 $dl_url="https:".$match["url"]; 64 65 } 65 66 $file_name=basename($match["url"]); … … 69 70 { 70 71 file_put_contents($font_file, 71 wp_remote_retrieve_body( wp_remote_get( $ match["url"], array('timeout' => 60, 'user-agent' => $_SERVER["HTTP_USER_AGENT"] ) ) ) );72 wp_remote_retrieve_body( wp_remote_get( $dl_url , array('timeout' => 60, 'user-agent' => $_SERVER["HTTP_USER_AGENT"] ) ) ) ); 72 73 $css=str_replace($match["url"],$font_url,$css); 73 74 }
Note: See TracChangeset
for help on using the changeset viewer.