WordPress 4.9.6 introduced several tools to help sites meet the requirements of the European Union’s new GDPR (General Data Protection Regulation) and other potential laws across the world. This article details what theme authors need to know about compatibility with the features.
For the most part, this should directly impact themes, but you should make sure that nothing in your theme’s design or functionality conflicts with these features.
<?php the_privacy_policy_link( '<div>', '</div>' ); ?>
- Block Themes:
- Classic Themes:
If you decide to create a custom template, make sure that you output the page’s content using the appropriate block or function:
When a logged out user comments on a post, they are asked for their name, email, and website. This information is stored locally in the commenter’s browser for two purposes:
- When they leave another comment on the site, their name, email, and website will be pre-populated into the respective fields.
- If their comment is held for moderation, they can return to that post and remove the comment before it is approved.
The information stored in this cookie is for convenience and is not essential. Therefore, the user needs to be given the choice to opt in or opt out of the storage of this data. For this reason, WordPress outputs a checkbox in the comment form that allows commenters to opt-in to storing this data in the cookie. This checkbox will be unchecked by default, as opt-in is an action the user must explicitly approve.
While most themes will not require any action, it is recommended that you double check that the input and label does not require CSS adjustments in custom themes.