Coding Standards: Use Yoda conditions where appropriate.

See #49222.
Built from https://develop.svn.wordpress.org/trunk@47219


git-svn-id: http://core.svn.wordpress.org/trunk@47019 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov
2020-02-09 16:55:09 +00:00
parent 5e6c949861
commit 641c632b0c
125 changed files with 555 additions and 555 deletions

View File

@@ -9,10 +9,10 @@
if ( isset( $_GET['page'] ) && ! empty( $_POST ) ) {
// Ensure POST-ing to `tools.php?page=export_personal_data` and `tools.php?page=remove_personal_data`
// continues to work after creating the new files for exporting and erasing of personal data.
if ( $_GET['page'] === 'export_personal_data' ) {
if ( 'export_personal_data' === $_GET['page'] ) {
require_once ABSPATH . 'wp-admin/export-personal-data.php';
return;
} elseif ( $_GET['page'] === 'remove_personal_data' ) {
} elseif ( 'remove_personal_data' === $_GET['page'] ) {
require_once ABSPATH . 'wp-admin/erase-personal-data.php';
return;
}
@@ -27,10 +27,10 @@ if ( isset( $_GET['wp-privacy-policy-guide'] ) ) {
exit;
} elseif ( isset( $_GET['page'] ) ) {
// These were also moved to files in WP 5.3.
if ( $_GET['page'] === 'export_personal_data' ) {
if ( 'export_personal_data' === $_GET['page'] ) {
wp_redirect( admin_url( 'export-personal-data.php' ), 301 );
exit;
} elseif ( $_GET['page'] === 'remove_personal_data' ) {
} elseif ( 'remove_personal_data' === $_GET['page'] ) {
wp_redirect( admin_url( 'erase-personal-data.php' ), 301 );
exit;
}