Last active
July 5, 2018 16:07
-
-
Save coreymckrill/bed546ef05c9917d0d01618588a2c206 to your computer and use it in GitHub Desktop.
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
<?php | |
// Drop this file into wp-content/mu-plugins. | |
// Test 1 - Remove Feedback callbacks from data export/erasure tools. | |
// Uncomment the next two lines to test. | |
//add_filter( 'wp_privacy_personal_data_exporters', 'remove_feedback_callback', 20 ); | |
//add_filter( 'wp_privacy_personal_data_erasers', 'remove_feedback_callback', 20 ); | |
function remove_feedback_callback( $callbacks ) { | |
unset( $callbacks['jetpack-feedback'] ); | |
return $callbacks; | |
} | |
// Test 2 - Prevent erasure of a feedback post. | |
// Uncomment the next line to test. | |
//add_filter( 'grunion_contact_form_delete_feedback_post', 'prevent_feedback_post_erasure', 10, 2 ); | |
function prevent_feedback_post_erasure( $prevention_message, $post_id ) { | |
$prevention_message = sprintf( | |
'Feedback with ID %d could not be erased because reasons.', | |
$post_id | |
); | |
return $prevention_message; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment