Title: New Privacy Policy page helpers coming in 5.2
Author: williampatton
Published: April 3, 2019
Last modified: July 10, 2019

---

 [  ](https://profiles.wordpress.org/williampatton/) [williampatton](https://profiles.wordpress.org/williampatton/)
7:30 pm _on_ April 3, 2019      

# New Privacy Policy page helpers coming in 5.2

In the WordPress 5.2 update new helpers have been added to make designing the Privacy
Policy page easier.

In total 4 new items were added which are available to use in themes or plugins.
There are 2 new CSSCSS CSS is an acronym for cascading style sheets. This is what
controls the design or look and feel of a site. classes to help target the Privacy
Policy page and menu items on the frontend, a new function that can be used in conditionals
and a brand new template available to allow themes to design or style the Privacy
Policy page anyway they choose.

 * `is_privacy_policy()` conditional query function
 * `privacy-policy.php` template
 * `.privacy-policy` body class
 * `.menu-item-privacy-policy` menu item class

You can start to take advantage of these items immediately upon the release of WordPress
5.2.

## Backwards Compatibility

If the new additions are used on older versions of WordPress prior to 5.2 the template
will not be used and the new CSS classes will not be output. The only backwards 
compatibility concern with using these new helpers is with the `is_privacy_policy()`
function.

To support the `is_privacy_policy()` function pre-5.2 the following shim can be 
added to the theme or pluginPlugin A plugin is a piece of software containing a 
group of functions that can be added to a WordPress website. They can extend functionality
or add new features to your WordPress websites. WordPress plugins are written in
the PHP programming language and integrate seamlessly with WordPress. These can 
be free in the WordPress.org Plugin Directory [https://wordpress.org/plugins/](https://wordpress.org/plugins/)
or can be cost-based plugin from a third-party.;

    ```wp-block-code
    <?php
    if ( ! function_exists( 'is_privacy_policy' ) ) {
            function is_privacy_policy() {
                    return get_option( 'wp_page_for_privacy_policy' ) && is_page( get_option( 'wp_page_for_privacy_policy' ) );
            }
    }
    ```

### Share this:

 * [  Threads ](https://make.wordpress.org/themes/2019/04/03/new-privacy-policy-page-helpers-coming-in-5-2/?share=threads)
 * [  Mastodon ](https://make.wordpress.org/themes/2019/04/03/new-privacy-policy-page-helpers-coming-in-5-2/?share=mastodon)
 * [  Bluesky ](https://make.wordpress.org/themes/2019/04/03/new-privacy-policy-page-helpers-coming-in-5-2/?share=bluesky)
 * [  Facebook ](https://make.wordpress.org/themes/2019/04/03/new-privacy-policy-page-helpers-coming-in-5-2/?share=facebook)
 * [  X ](https://make.wordpress.org/themes/2019/04/03/new-privacy-policy-page-helpers-coming-in-5-2/?share=x)
 * [  LinkedIn ](https://make.wordpress.org/themes/2019/04/03/new-privacy-policy-page-helpers-coming-in-5-2/?share=linkedin)

 * [Login to Reply](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fmake.wordpress.org%2Fthemes%2F2019%2F04%2F03%2Fnew-privacy-policy-page-helpers-coming-in-5-2%2F%23respond&locale=en_US)

### Leave a Reply 󠀁[Cancel reply](https://make.wordpress.org/themes/2019/04/03/new-privacy-policy-page-helpers-coming-in-5-2/?output_format=md#respond)󠁿

You must be [logged in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fmake.wordpress.org%2Fthemes%2F2019%2F04%2F03%2Fnew-privacy-policy-page-helpers-coming-in-5-2%2F&locale=en_US)
to post a comment.

This site uses Akismet to reduce spam. [Learn how your comment data is processed.](https://akismet.com/privacy/)

# Post navigation

[← Note for Themes about Core PHP Compatibility Changes in WordPress 5.2](https://make.wordpress.org/themes/2019/04/01/core-php-compatibility-changes-in-wordpress-5-2/)

[Multiple Accounts Requirement →](https://make.wordpress.org/themes/2019/04/05/multiple-accounts-requirement/)