Privacy: make creating a privacy policy page on install multisite compatible.

See #43491.
Built from https://develop.svn.wordpress.org/trunk@43243


git-svn-id: http://core.svn.wordpress.org/trunk@43072 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrew Ozz 2018-05-11 15:44:21 +00:00
parent 5c5a527d96
commit 1b1cc0b371
2 changed files with 42 additions and 34 deletions

View File

@ -308,11 +308,18 @@ As a new WordPress user, you should go to <a href=\"%s\">your dashboard</a> to d
);
// Privacy Policy page
if ( is_multisite() ) {
// Disable by default unless the suggested content is provided.
$privacy_policy_content = get_site_option( 'default_privacy_policy_content' );
} else {
if ( ! class_exists( 'WP_Privacy_Policy_Content' ) ) {
include_once( ABSPATH . 'wp-admin/includes/misc.php' );
}
$privacy_policy_content = WP_Privacy_Policy_Content::get_default_content();
}
if ( ! empty( $privacy_policy_content ) ) {
$privacy_policy_guid = get_option( 'home' ) . '/?page_id=3';
$wpdb->insert(
@ -344,6 +351,7 @@ As a new WordPress user, you should go to <a href=\"%s\">your dashboard</a> to d
)
);
update_option( 'wp_page_for_privacy_policy', 3 );
}
// Set up default widgets for default theme.
update_option(

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '5.0-alpha-43242';
$wp_version = '5.0-alpha-43243';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.