[wp-trac] [WordPress Trac] #44005: Introduce Privacy Policy Page helpers; is_privacy_policy() query function, privacy-policy body class, privacy-policy.php template and .menu-item-privacy-policy menu item class
WordPress Trac
noreply at wordpress.org
Wed Mar 20 21:17:23 UTC 2019
#44005: Introduce Privacy Policy Page helpers; is_privacy_policy() query function,
privacy-policy body class, privacy-policy.php template and .menu-item-
privacy-policy menu item class
-------------------------------------------------+-------------------------
Reporter: Clorith | Owner: garrett-
| eclipse
Type: enhancement | Status: assigned
Priority: normal | Milestone: 5.2
Component: Privacy | Version: 4.9.6
Severity: normal | Resolution:
Keywords: needs-testing has-patch has-unit- | Focuses: template,
tests dev-feedback | privacy
-------------------------------------------------+-------------------------
Comment (by birgire):
@garrett-eclipse good catch regarding the menu class.
@garrett-eclipse & @xkon: I did some manual testing on
[attachment:"44005.5.diff"] and verified few things:
- The {{{privacy-policy.php}}} template file, in the current theme's
directory, is loaded for the Privacy Policy page as expected.
- The {{{privacy-policy}}} body class shows up on the Privacy Policy page,
as expected.
- The {{{is_privacy_policy()}}}, {{{is_page()}}} and {{{is_singular()}}}
are true within the {{{privacy-policy.php}}} template file, as expected.
- The {{{menu-item-privacy-policy}}} nav-menu class when the Privacy
Policy page is added to the nav-menu, as expected.
ps: as a part of the doc part, it would be nice to have
https://developer.wordpress.org/themes/basics/template-hierarchy
updated after this has landed.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/44005#comment:25>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list