the_privacy_policy_link( string $before = '', string $after = '' )

Displays the privacy policy link with formatting, when applicable.


Parameters Parameters

$before

(string) (Optional) Display before privacy policy link.

Default value: ''

$after

(string) (Optional) Display after privacy policy link.

Default value: ''


Top ↑

Source Source

File: wp-includes/link-template.php

function the_privacy_policy_link( $before = '', $after = '' ) {
	echo get_the_privacy_policy_link( $before, $after );
}


Top ↑

Changelog Changelog

Changelog
Version Description
4.9.6 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

  1. Skip to note 1 content
    Contributed by Jb Audras

    Sample code for theme integration, with function_exists() test to avoid fatal error on previous WordPress versions.

    <?php
    if ( function_exists( 'the_privacy_policy_link' ) ) {
    	the_privacy_policy_link( '<div class="privacy-policy-link-wrapper">', '</div>' );
    }
    ?>
    

    HTML output example (the permalink and the anchor will be dynamically generated):

    <div class="privacy-policy-link-wrapper">
    	<a class="privacy-policy-link" href="https://example.com/privacy-policy/">Privacy Policy</a>
    </div>
    

You must log in before being able to contribute a note or feedback.