This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Strip EXIF data from images upon upload. | |
| */ | |
| add_filter('wp_handle_upload_prefilter', 'custom_upload_filter' ); | |
| function custom_upload_filter( $file ){ | |
| $image = $file['tmp_name']; | |
| try |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Check that required variables exist | |
| if( ( process.argv[2] == undefined ) || ( process.argv[3] == undefined ) ){ | |
| console.log('Missing variables') | |
| console.log('1, local path to coverage file. 2, url to target css file') | |
| return; | |
| } | |
| (async () => { | |
| var fs = require("fs"); |