Skip to content

Instantly share code, notes, and snippets.

@rhyswynne rhyswynne/gdpr.php
Created Jun 18, 2018

Embed
What would you like to do?
How WP Email Capture adds content to the Privacy Policy Page
<?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
You can’t perform that action at this time.