From 41a82d60787ae739d15b8fd5309cf7387658733c Mon Sep 17 00:00:00 2001 From: Andrew Ozz Date: Wed, 25 Apr 2018 18:10:21 +0000 Subject: [PATCH] Privacy: add better docs for `wp_add_privacy_policy_content()` and `WP_Privacy_Policy_Content::add()`. See #43620. Built from https://develop.svn.wordpress.org/trunk@43003 git-svn-id: http://core.svn.wordpress.org/trunk@42832 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/misc.php | 12 ++++++++---- wp-admin/includes/plugin.php | 14 +++++++++++--- wp-includes/version.php | 2 +- 3 files changed, 20 insertions(+), 8 deletions(-) diff --git a/wp-admin/includes/misc.php b/wp-admin/includes/misc.php index ea7d76dee6..89ba857017 100644 --- a/wp-admin/includes/misc.php +++ b/wp-admin/includes/misc.php @@ -1281,14 +1281,18 @@ final class WP_Privacy_Policy_Content { private function __construct() {} /** - * Add privacy information to the postbox shown when editing the privacy policy. + * 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()`. * - * $since 5.0.0 + * $since 4.9.6 * - * @param string $plugin_name The plugin'as name. Will be shown in the privacy policy metabox. - * @param string $policy_text The content that should appear in the site's privacy policy. + * @param string $plugin_name The name of the plugin or theme that is suggesting content for the site's privacy policy. + * @param string $policy_text The suggested content for inclusion in the policy. */ public static function add( $plugin_name, $policy_text ) { if ( empty( $plugin_name ) || empty( $policy_text ) ) { diff --git a/wp-admin/includes/plugin.php b/wp-admin/includes/plugin.php index cbf617fd96..7e660f064b 100644 --- a/wp-admin/includes/plugin.php +++ b/wp-admin/includes/plugin.php @@ -2016,14 +2016,22 @@ function plugin_sandbox_scrape( $plugin ) { } /** - * Helper function for adding plugin specific information to the postbox shown when editing the privacy policy. + * Helper function for adding 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. + * + * A plugin or theme can use this function multiple times as long as it will help to better present + * the suggested policy content. For example modular plugins such as WooCommerse or Jetpack + * can add or remove suggested content depending on the modules/extensions that are enabled. * * Intended for use with the `'admin_init'` action. * * @since 4.9.6 * - * @param string $plugin_name The plugin'as name. Will be shown in the privacy policy metabox. - * @param string $policy_text The content that should appear in the site's privacy policy. + * @param string $plugin_name The name of the plugin or theme that is suggesting content for the site's privacy policy. + * @param string $policy_text The suggested content for inclusion in the policy. * For more information see the Plugins Handbook https://developer.wordpress.org/plugins/. */ function wp_add_privacy_policy_content( $plugin_name, $policy_text ) { diff --git a/wp-includes/version.php b/wp-includes/version.php index 68be7535e7..d1c16b5567 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '5.0-alpha-43002'; +$wp_version = '5.0-alpha-43003'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.