the_privacy_policy_link
Filter HookDescription
Filters the privacy policy link.Hook Information
File Location |
wp-includes/link-template.php
View on GitHub
|
Hook Type | Filter |
Line Number | 4786 |
Hook Parameters
Type | Name | Description |
---|---|---|
string
|
$link
|
The privacy policy link. Empty string if it doesn't exist. |
string
|
$privacy_policy_url
|
The URL of the privacy policy. Empty string if it doesn't exist. |
Usage Examples
Basic Usage
<?php
// Hook into the_privacy_policy_link
add_filter('the_privacy_policy_link', 'my_custom_filter', 10, 2);
function my_custom_filter($link, $privacy_policy_url) {
// Your custom filtering logic here
return $link;
}
Source Code Context
wp-includes/link-template.php:4786
- How this hook is used in WordPress core
<?php
4781 * @param string $link The privacy policy link. Empty string if it
4782 * doesn't exist.
4783 * @param string $privacy_policy_url The URL of the privacy policy. Empty string
4784 * if it doesn't exist.
4785 */
4786 $link = apply_filters( 'the_privacy_policy_link', $link, $privacy_policy_url );
4787
4788 if ( $link ) {
4789 return $before . $link . $after;
4790 }
4791
PHP Documentation
<?php
/**
* Filters the privacy policy link.
*
* @since 4.9.6
*
* @param string $link The privacy policy link. Empty string if it
* doesn't exist.
* @param string $privacy_policy_url The URL of the privacy policy. Empty string
* if it doesn't exist.
*/
Quick Info
- Hook Type: Filter
- Parameters: 2
- File: wp-includes/link-template.php
Related Hooks
Related hooks will be displayed here in future updates.