diff --git a/wp-mat.php b/wp-mat.php index 315f5a20f012e7a84bb38be4122ee51b02c2744e..bf9ecbe2cb1bbd89ef3a4a96f18c19220427fddc 100644 --- a/wp-mat.php +++ b/wp-mat.php @@ -3,7 +3,7 @@ * Plugin Name: wp-mat * Plugin URI: https://git.autistici.org/noblogs/wp-mat * Description: Process uploaded files through MAT - * Version: 0.1.1 + * Version: 0.1.2 * Author: Autistici/Inventati * Author URI: https://www.autistici.org/ * License: MIT @@ -38,7 +38,7 @@ class WP_Mat { // store the results into '$output_path'. function issue_cleanup_request($path, $mimetype, $output_path) { $upfile = new CURLFile($path, $mimetype, 'input'); - + $curl = curl_init(); curl_setopt($curl, CURLOPT_URL, WP_MAT_ENDPOINT); curl_setopt($curl, CURLOPT_USERAGENT, 'Wordpress'); @@ -53,7 +53,7 @@ class WP_Mat { } curl_setopt($curl, CURLOPT_FILE, $fp); curl_setopt($curl, CURLOPT_BINARYTRANSFER, true); - + $ret = curl_exec($curl); fclose($fp); @@ -115,7 +115,7 @@ class WP_Mat { 'wpmat_settings_section', 'Metadata anonymization for uploads', array($this, 'settings_section_callback'), - 'writing' + 'media' ); // Add the field with the names and function to use for our new @@ -124,17 +124,18 @@ class WP_Mat { 'wpmat_disabled', 'Disable metadata anonymization', array($this, 'settings_field_callback'), - 'writing', + 'media', 'wpmat_settings_section' ); // Register our setting so that $_POST handling is done for us and // our callback function just has to echo the <input>. - register_setting('writing', 'wpmat_disabled'); + register_setting('media', 'wpmat_disabled'); } function settings_section_callback() { - echo('<p>Control whether uploaded files are run through metadata anonymization (using MAT2).</p>'); + echo('<p>Control whether uploaded files are run through metadata anonymization (using <a href="https://0xacab.org/jvoisin/mat2">MAT2</a>). '); + echo('This feature is enabled by default but it can be disabled in case you are experiencing problems uploading files.</p>'); } function settings_field_callback() {