Make WordPress Core


Ignore:
Timestamp:
02/07/2023 02:03:26 PM (19 months ago)
Author:
audrasjb
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/link-template.php

    r55239 r55261  
    46654665    if ( $privacy_policy_url && $page_title ) {
    46664666        $link = sprintf(
    4667             '<a class="privacy-policy-link" href="%s">%s</a>',
     4667            '<a class="privacy-policy-link" href="%s" rel="privacy-policy">%s</a>',
    46684668            esc_url( $privacy_policy_url ),
    46694669            esc_html( $page_title )
Note: See TracChangeset for help on using the changeset viewer.