WordPress.org

Make WordPress Core

Changeset 47412


Ignore:
Timestamp:
03/03/2020 12:48:21 AM (16 months ago)
Author:
johnbillion
Message:

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

Props Jurgen Oldenburg, garrett-eclipse

Fixes #49476

Location:
trunk/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/tools.php

    r47219 r47412  
    1919}
    2020
    21 /** WordPress Administration Bootstrap */
    22 require_once __DIR__ . '/admin.php';
    23 
    2421// The privacy policy guide used to be outputted from here. Since WP 5.3 it is in wp-admin/privacy-policy-guide.php.
    2522if ( isset( $_GET['wp-privacy-policy-guide'] ) ) {
     23    require_once dirname( __DIR__ ) . '/wp-load.php';
    2624    wp_redirect( admin_url( 'privacy-policy-guide.php' ), 301 );
    2725    exit;
     
    2927    // These were also moved to files in WP 5.3.
    3028    if ( 'export_personal_data' === $_GET['page'] ) {
     29        require_once dirname( __DIR__ ) . '/wp-load.php';
    3130        wp_redirect( admin_url( 'export-personal-data.php' ), 301 );
    3231        exit;
    3332    } elseif ( 'remove_personal_data' === $_GET['page'] ) {
     33        require_once dirname( __DIR__ ) . '/wp-load.php';
    3434        wp_redirect( admin_url( 'erase-personal-data.php' ), 301 );
    3535        exit;
    3636    }
    3737}
     38
     39/** WordPress Administration Bootstrap */
     40require_once __DIR__ . '/admin.php';
    3841
    3942$title = __( 'Tools' );
  • trunk/src/wp-includes/user.php

    r47369 r47412  
    31893189    }
    31903190
    3191     $manage_url         = add_query_arg( 'page', $request->action_name, admin_url( 'tools.php' ) );
     3191    if ( 'export_personal_data' === $request->action_name ) {
     3192        $manage_url = admin_url( 'export-personal-data.php' );
     3193    } elseif ( 'remove_personal_data' === $request->action_name ) {
     3194        $manage_url = admin_url( 'erase-personal-data.php' );
     3195    }
    31923196    $action_description = wp_user_request_action_description( $request->action_name );
    31933197
Note: See TracChangeset for help on using the changeset viewer.