Coding Standards: Use a strict `in_array()` check for reserved names of user data items in `wp_user_personal_data_exporter()`.

Props azaozz.
Fixes #47509.
Built from https://develop.svn.wordpress.org/trunk@47277


git-svn-id: http://core.svn.wordpress.org/trunk@47077 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2020-02-11 20:55:07 +00:00
parent 17e563cd9c
commit cbaf9bf9d1
2 changed files with 4 additions and 4 deletions

View File

@ -2942,7 +2942,7 @@ function wp_register_user_personal_data_exporter( $exporters ) {
* @since 5.4.0 Added 'Community Events Location' group to the export data.
* @since 5.4.0 Added 'Session Tokens' group to the export data.
*
* @param string $email_address The users email address.
* @param string $email_address The user's email address.
* @return array An array of personal data.
*/
function wp_user_personal_data_exporter( $email_address ) {
@ -3010,7 +3010,7 @@ function wp_user_personal_data_exporter( $email_address ) {
$reserved_names = array_values( $user_props_to_export );
/**
* Filter to extend the Users profile data for the privacy exporter.
* Filter to extend the user's profile data for the privacy exporter.
*
* @since 5.4.0
*
@ -3031,7 +3031,7 @@ function wp_user_personal_data_exporter( $email_address ) {
$extra_data = array_filter(
$_extra_data,
function( $item ) use ( $reserved_names ) {
return ! in_array( $item['name'], $reserved_names );
return ! in_array( $item['name'], $reserved_names, true );
}
);

View File

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