Make WordPress Core

Changeset 47417


Ignore:
Timestamp:
03/03/2020 05:07:46 PM (4 years ago)
Author:
SergeyBiryukov
Message:

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.

Location:
branches/5.3
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/5.3

  • branches/5.3/src/wp-admin/tools.php

    r45932 r47417  
    1919}
    2020
    21 /** WordPress Administration Bootstrap */
    22 require_once( dirname( __FILE__ ) . '/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 ( $_GET['page'] === 'export_personal_data' ) {
     29        require_once dirname( __DIR__ ) . '/wp-load.php';
    3130        wp_redirect( admin_url( 'export-personal-data.php' ), 301 );
    3231        exit;
    3332    } elseif ( $_GET['page'] === 'remove_personal_data' ) {
     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( dirname( __FILE__ ) . '/admin.php' );
    3841
    3942$title = __( 'Tools' );
  • branches/5.3/src/wp-includes/user.php

    r46417 r47417  
    30643064    }
    30653065
    3066     $manage_url         = add_query_arg( 'page', $request->action_name, admin_url( 'tools.php' ) );
     3066    if ( 'export_personal_data' === $request->action_name ) {
     3067        $manage_url = admin_url( 'export-personal-data.php' );
     3068    } elseif ( 'remove_personal_data' === $request->action_name ) {
     3069        $manage_url = admin_url( 'erase-personal-data.php' );
     3070    }
    30673071    $action_description = wp_user_request_action_description( $request->action_name );
    30683072
Note: See TracChangeset for help on using the changeset viewer.