Skip to content

Instantly share code, notes, and snippets.

@rhyswynne
Created June 18, 2018 10:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rhyswynne/625d88063cf7bbe46fcdee6dcb0e3693 to your computer and use it in GitHub Desktop.
Save rhyswynne/625d88063cf7bbe46fcdee6dcb0e3693 to your computer and use it in GitHub Desktop.
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