Created
June 18, 2018 10:14
-
-
Save rhyswynne/625d88063cf7bbe46fcdee6dcb0e3693 to your computer and use it in GitHub Desktop.
How WP Email Capture adds content to the Privacy Policy Page
This file contains 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 | |
/** | |
* Add Privacy Policy Content to WP Email Capture | |
* | |
* @return void | |
*/ | |
function wp_email_capture_add_privacy_policy_content() { | |
if ( ! function_exists( 'wp_add_privacy_policy_content' ) ) { | |
return; | |
} | |
$content = __( 'We use a WordPress plugin called WP Email Capture to aid management of our email marketing list. | |
Should you wish to subscribe to our newsletter, we collect the following data:- | |
Your Name (or what you chose to address yourself as). This is used for simple personalisation purposes. | |
Your Email Address. This is used to contact you and include you in our newsletter. | |
The date of signup. This is so we can reference when to delete your data at a later date.', | |
'wp-email-capture' ); | |
wp_add_privacy_policy_content( | |
'WP Email Capture', | |
wp_kses_post( wpautop( $content, false ) ) | |
); | |
} add_action( 'admin_init', 'wp_email_capture_add_privacy_policy_content', 160 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment