Privacy: Fix the URLs and legacy redirects for the personal data export and erasure screens.

Props Jurgen Oldenburg, garrett-eclipse.
Merges [47412] to the 5.3 branch.
Fixes #49476.
Built from https://develop.svn.wordpress.org/branches/5.3@47417


git-svn-id: http://core.svn.wordpress.org/branches/5.3@47204 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2020-03-03 17:09:04 +00:00
parent 0d0a870240
commit 511f7cb751
3 changed files with 12 additions and 5 deletions

View File

@ -18,24 +18,27 @@ if ( isset( $_GET['page'] ) && ! empty( $_POST ) ) {
} }
} }
/** WordPress Administration Bootstrap */
require_once( dirname( __FILE__ ) . '/admin.php' );
// The privacy policy guide used to be outputted from here. Since WP 5.3 it is in wp-admin/privacy-policy-guide.php. // The privacy policy guide used to be outputted from here. Since WP 5.3 it is in wp-admin/privacy-policy-guide.php.
if ( isset( $_GET['wp-privacy-policy-guide'] ) ) { if ( isset( $_GET['wp-privacy-policy-guide'] ) ) {
require_once dirname( __DIR__ ) . '/wp-load.php';
wp_redirect( admin_url( 'privacy-policy-guide.php' ), 301 ); wp_redirect( admin_url( 'privacy-policy-guide.php' ), 301 );
exit; exit;
} elseif ( isset( $_GET['page'] ) ) { } elseif ( isset( $_GET['page'] ) ) {
// These were also moved to files in WP 5.3. // These were also moved to files in WP 5.3.
if ( $_GET['page'] === 'export_personal_data' ) { if ( $_GET['page'] === 'export_personal_data' ) {
require_once dirname( __DIR__ ) . '/wp-load.php';
wp_redirect( admin_url( 'export-personal-data.php' ), 301 ); wp_redirect( admin_url( 'export-personal-data.php' ), 301 );
exit; exit;
} elseif ( $_GET['page'] === 'remove_personal_data' ) { } elseif ( $_GET['page'] === 'remove_personal_data' ) {
require_once dirname( __DIR__ ) . '/wp-load.php';
wp_redirect( admin_url( 'erase-personal-data.php' ), 301 ); wp_redirect( admin_url( 'erase-personal-data.php' ), 301 );
exit; exit;
} }
} }
/** WordPress Administration Bootstrap */
require_once( dirname( __FILE__ ) . '/admin.php' );
$title = __( 'Tools' ); $title = __( 'Tools' );
get_current_screen()->add_help_tab( get_current_screen()->add_help_tab(

View File

@ -3063,7 +3063,11 @@ function _wp_privacy_send_request_confirmation_notification( $request_id ) {
return; return;
} }
$manage_url = add_query_arg( 'page', $request->action_name, admin_url( 'tools.php' ) ); if ( 'export_personal_data' === $request->action_name ) {
$manage_url = admin_url( 'export-personal-data.php' );
} elseif ( 'remove_personal_data' === $request->action_name ) {
$manage_url = admin_url( 'erase-personal-data.php' );
}
$action_description = wp_user_request_action_description( $request->action_name ); $action_description = wp_user_request_action_description( $request->action_name );
/** /**

View File

@ -13,7 +13,7 @@
* *
* @global string $wp_version * @global string $wp_version
*/ */
$wp_version = '5.3.3-alpha-47319'; $wp_version = '5.3.3-alpha-47417';
/** /**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.