wp_get_default_privacy_policy_content filter-hookWP 4.9.6

Deprecated from version 5.7.0. It is no longer supported and can be removed in future releases. Use wp_add_privacy_policy_content() instead.

Filters the default content suggested for inclusion in a privacy policy.

Usage

add_filter( 'wp_get_default_privacy_policy_content', 'wp_kama_get_default_privacy_policy_content_filter', 10, 3 );

/**
 * Function for `wp_get_default_privacy_policy_content` filter-hook.
 * 
 * @param string   $content     The default policy content.
 * @param string[] $strings     An array of privacy policy content strings.
 * @param bool     $description Whether policy descriptions should be included.
 *
 * @return string
 */
function wp_kama_get_default_privacy_policy_content_filter( $content, $strings, $description ){

	// filter...
	return $content;
}
$content(string)
The default policy content.
$strings(string[])
An array of privacy policy content strings.
$description(true|false)
Whether policy descriptions should be included.

Changelog

Since 4.9.6 Introduced.
Since 5.0.0 Added the $strings, $description, and $blocks parameters.
Deprecated since 5.7.0 Use wp_add_privacy_policy_content() instead.

Where the hook is called

WP_Privacy_Policy_Content::get_default_content()
wp_get_default_privacy_policy_content
wp-admin/includes/class-wp-privacy-policy-content.php 689-694
return apply_filters_deprecated(
	'wp_get_default_privacy_policy_content',
	array( $content, $strings, $description, $blocks ),
	'5.7.0',
	'wp_add_privacy_policy_content()'
);

Where the hook is used in WordPress

Usage not found.