Privacy: Add rel="privacy-policy" to the Privacy Policy link.

This changeset adds a `rel="privacy-policy"` attribute to user-facing links to the Privacy Policy of the website, when a privacy policy page is set and available. While this `rel` value is still a RFC of the Link Types HTML specification, this changeset helps to make Privacy Policy link more discoverable for user agents and HTML parsers. 

Props dshanske, audrasjb, bhavz-10, bookwyrm, faisal03, JeffPaul, peterwilsoncc, paapst, davidbaumwald, costdev, robinwpdeveloper, kawserz.
Fixes #56345.

Built from https://develop.svn.wordpress.org/trunk@55261


git-svn-id: http://core.svn.wordpress.org/trunk@54794 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
audrasjb
2023-02-07 14:05:20 +00:00
parent 11d374ff97
commit 8dc60dd213
3 changed files with 13 additions and 3 deletions

View File

@@ -4664,7 +4664,7 @@ function get_the_privacy_policy_link( $before = '', $after = '' ) {
if ( $privacy_policy_url && $page_title ) {
$link = sprintf(
'<a class="privacy-policy-link" href="%s">%s</a>',
'<a class="privacy-policy-link" href="%s" rel="privacy-policy">%s</a>',
esc_url( $privacy_policy_url ),
esc_html( $page_title )
);