privacy_policy_url
Filters the URL of the privacy policy page.
Usage
add_filter( 'privacy_policy_url', 'wp_kama_privacy_policy_url_filter', 10, 2 ); /** * Function for `privacy_policy_url` filter-hook. * * @param string $url The URL to the privacy policy page. Empty string if it doesn't exist. * @param int $policy_page_id The ID of privacy policy page. * * @return string */ function wp_kama_privacy_policy_url_filter( $url, $policy_page_id ){ // filter... return $url; }
- $url(string)
- The URL to the privacy policy page. Empty string if it doesn't exist.
- $policy_page_id(int)
- The ID of privacy policy page.
Changelog
Since 4.9.6 | Introduced. |
Where the hook is called
privacy_policy_url
wp-includes/link-template.php 4736
return apply_filters( 'privacy_policy_url', $url, $policy_page_id );