Used By
Used By | Description |
---|---|
wp-admin/includes/plugin.php: wp_add_privacy_policy_content() | Helper function for adding content to the Privacy Policy Guide. |
Add content to the postbox shown when editing the privacy policy.
Plugins and themes should suggest text for inclusion in the site’s privacy policy. The suggested text should contain information about any functionality that affects user privacy, and will be shown in the Suggested Privacy Policy Content postbox.
Intended for use from wp_add_privacy_policy_content()
.
(string) (Required) The name of the plugin or theme that is suggesting content for the site's privacy policy.
(string) (Required) The suggested content for inclusion in the policy.
File: wp-admin/includes/class-wp-privacy-policy-content.php
public static function add( $plugin_name, $policy_text ) { if ( empty( $plugin_name ) || empty( $policy_text ) ) { return; } $data = array( 'plugin_name' => $plugin_name, 'policy_text' => $policy_text, ); if ( ! in_array( $data, self::$policy_content, true ) ) { self::$policy_content[] = $data; } }
Version | Description |
---|---|
4.9.6 | Introduced. |
© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wp_privacy_policy_content/add