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.

git-svn-id: https://develop.svn.wordpress.org/trunk@47277 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov 2020-02-11 20:53:40 +00:00
parent 4020493d45
commit d6352c544b

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 );
}
);