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

Displays the privacy policy link with formatting, when applicable.

Parameters

$beforestringoptional
Display before privacy policy link.

Default:''

$afterstringoptional
Display after privacy policy link.

Default:''

Source

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

Changelog

VersionDescription
4.9.6Introduced.

User Contributed Notes

  1. Skip to note 2 content

    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.