Add Your Own Section to the Privacy Policy Guide
Adds a suggested paragraph about your custom code (such as analytics, embeds or contact forms) to the Privacy Policy Guide under Settings > Privacy, ready to copy into your policy.
Opens WPIDE on
Code
// Heading and suggested policy text.
$wpide_policy_name = 'Site customizations';
$wpide_policy_text = '<p>We use privacy-friendly analytics that do not set cookies or store your IP address.</p>'
. '<p>Embedded videos and maps only load after you click them, so the provider does not receive data before you choose to watch or view.</p>'
. '<p>Messages sent through our contact form are emailed to us and deleted from our inbox after 12 months.</p>';
add_action( 'admin_init', function () use ( $wpide_policy_name, $wpide_policy_text ) {
if ( function_exists( 'wp_add_privacy_policy_content' ) ) {
wp_add_privacy_policy_content( $wpide_policy_name, wp_kses_post( wpautop( $wpide_policy_text, false ) ) );
}
} );
Notes
Edit the text to describe what your site really collects; the guide only suggests content and does not change your policy page.
How to add this snippet
- Install WPIDE on your WordPress site (it is free) and open Code Snippets.
- Use snippet above adds it from the library in one click. Or copy the code into a new snippet with the same code type.
- It is added inactive: review the code and settings, then switch it on.