WordPress at Your Fingertips
function is not described

WP_Privacy_Policy_Content::add() public WP 4.9.6

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().

{} It's a method of the class: WP_Privacy_Policy_Content{}

No Hooks.


null. Nothing.


$result = WP_Privacy_Policy_Content::add( $plugin_name, $policy_text );
$plugin_name(string) (required)
The name of the plugin or theme that is suggesting content for the site's privacy policy.
$policy_text(string) (required)
The suggested content for inclusion in the policy.


Since 4.9.6 Introduced.

Code of WP_Privacy_Policy_Content::add() WP 5.8.2

public static function add( $plugin_name, $policy_text ) {
	if ( empty( $plugin_name ) || empty( $policy_text ) ) {

	$data = array(
		'plugin_name' => $plugin_name,
		'policy_text' => $policy_text,

	if ( ! in_array( $data, self::$policy_content, true ) ) {
		self::$policy_content[] = $data;