Privacy: Redirect to newly created Privacy Policy page to improve UX.

Previously the user was shown a message that the page was created, but might not understand that they still need to visit the page and publish it. Redirecting them to the page makes it more obvious that additional steps are involved.

Props Clorith, xkon, azaozz.
Merges [43160] to the 4.9 branch.
Fixes #43926.
Built from https://develop.svn.wordpress.org/branches/4.9@43161


git-svn-id: http://core.svn.wordpress.org/branches/4.9@42990 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrew Ozz 2018-05-03 20:10:24 +00:00
parent 3e36496be3
commit d664ac9ea6
2 changed files with 3 additions and 11 deletions

View File

@ -61,16 +61,8 @@ if ( ! empty( $action ) ) {
} else {
update_option( 'wp_page_for_privacy_policy', $privacy_policy_page_id );
add_settings_error(
'page_for_privacy_policy',
'page_for_privacy_policy',
sprintf(
/* translators: %s: URL to edit Privacy Policy page */
__( 'Your privacy policy page created successfully. You&#8217;ll want to <a href="%s">review and edit your policy</a> next.' ),
'post.php?post=' . $privacy_policy_page_id . '&action=edit'
),
'updated'
);
wp_redirect( admin_url( 'post.php?post=' . $privacy_policy_page_id . '&action=edit' ) );
exit;
}
}
}

View File

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