WordPress.org

Make WordPress Core


Ignore:
Timestamp:
02/09/2020 04:52:28 PM (20 months ago)
Author:
SergeyBiryukov
Message:

Coding Standards: Use Yoda conditions where appropriate.

See #49222.

File:
1 edited

Legend:

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

    r47198 r47219  
    1010    // Ensure POST-ing to `tools.php?page=export_personal_data` and `tools.php?page=remove_personal_data`
    1111    // continues to work after creating the new files for exporting and erasing of personal data.
    12     if ( $_GET['page'] === 'export_personal_data' ) {
     12    if ( 'export_personal_data' === $_GET['page'] ) {
    1313        require_once ABSPATH . 'wp-admin/export-personal-data.php';
    1414        return;
    15     } elseif ( $_GET['page'] === 'remove_personal_data' ) {
     15    } elseif ( 'remove_personal_data' === $_GET['page'] ) {
    1616        require_once ABSPATH . 'wp-admin/erase-personal-data.php';
    1717        return;
     
    2828} elseif ( isset( $_GET['page'] ) ) {
    2929    // These were also moved to files in WP 5.3.
    30     if ( $_GET['page'] === 'export_personal_data' ) {
     30    if ( 'export_personal_data' === $_GET['page'] ) {
    3131        wp_redirect( admin_url( 'export-personal-data.php' ), 301 );
    3232        exit;
    33     } elseif ( $_GET['page'] === 'remove_personal_data' ) {
     33    } elseif ( 'remove_personal_data' === $_GET['page'] ) {
    3434        wp_redirect( admin_url( 'erase-personal-data.php' ), 301 );
    3535        exit;
Note: See TracChangeset for help on using the changeset viewer.