Privacy: make creating a privacy policy page on install multisite compatible.
See #43491. git-svn-id: https://develop.svn.wordpress.org/trunk@43243 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
d7e8ec62c5
commit
6508ab45cd
|
@ -308,11 +308,18 @@ As a new WordPress user, you should go to <a href=\"%s\">your dashboard</a> to d
|
||||||
);
|
);
|
||||||
|
|
||||||
// Privacy Policy page
|
// 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' ) ) {
|
if ( ! class_exists( 'WP_Privacy_Policy_Content' ) ) {
|
||||||
include_once( ABSPATH . 'wp-admin/includes/misc.php' );
|
include_once( ABSPATH . 'wp-admin/includes/misc.php' );
|
||||||
}
|
}
|
||||||
|
|
||||||
$privacy_policy_content = WP_Privacy_Policy_Content::get_default_content();
|
$privacy_policy_content = WP_Privacy_Policy_Content::get_default_content();
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( ! empty( $privacy_policy_content ) ) {
|
||||||
$privacy_policy_guid = get_option( 'home' ) . '/?page_id=3';
|
$privacy_policy_guid = get_option( 'home' ) . '/?page_id=3';
|
||||||
|
|
||||||
$wpdb->insert(
|
$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 );
|
update_option( 'wp_page_for_privacy_policy', 3 );
|
||||||
|
}
|
||||||
|
|
||||||
// Set up default widgets for default theme.
|
// Set up default widgets for default theme.
|
||||||
update_option(
|
update_option(
|
||||||
|
|
Loading…
Reference in New Issue