wp_get_default_privacy_policy_content
Устарел с версии 5.7.0. Больше не поддерживается и может быть удален. Используйте
wp_add_privacy_policy_content().Filters the default content suggested for inclusion in a privacy policy.
Использование
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(строка)
- The default policy content.
- $strings(string[])
- An array of privacy policy content strings.
- $description(true|false)
- Whether policy descriptions should be included.
Список изменений
| С версии 4.9.6 | Введена. |
| С версии 5.0.0 | Added the $strings, $description, and $blocks parameters. |
| Устарела с 5.7.0 | Use wp_add_privacy_policy_content() instead. |
Где вызывается хук
wp_get_default_privacy_policy_content
wp-admin/includes/class-wp-privacy-policy-content.php 687-692
return apply_filters_deprecated( 'wp_get_default_privacy_policy_content', array( $content, $strings, $description, $blocks ), '5.7.0', 'wp_add_privacy_policy_content()' );