Changeset 47236 for trunk/src/wp-includes/user.php
- Timestamp:
- 02/10/2020 05:30:03 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/user.php
r47219 r47236 2960 2960 $user_meta = get_user_meta( $user->ID ); 2961 2961 2962 $user_prop _to_export = array(2962 $user_props_to_export = array( 2963 2963 'ID' => __( 'User ID' ), 2964 2964 'user_login' => __( 'User Login Name' ), … … 2976 2976 $user_data_to_export = array(); 2977 2977 2978 foreach ( $user_prop _to_export as $key => $name ) {2978 foreach ( $user_props_to_export as $key => $name ) { 2979 2979 $value = ''; 2980 2980 … … 3013 3013 ); 3014 3014 3015 /** 3016 * Introduce any Community Events Location data that is available. 3017 * 3018 * @since 5.4.0 3019 */ 3020 if ( isset( $user_meta['community-events-location'] ) ) { 3021 $location = maybe_unserialize( $user_meta['community-events-location'][0] ); 3022 3023 $location_props_to_export = array( 3024 'description' => __( 'City' ), 3025 'country' => __( 'Country' ), 3026 'latitude' => __( 'Latitude' ), 3027 'longitude' => __( 'Longitude' ), 3028 'ip' => __( 'IP' ), 3029 ); 3030 3031 $location_data_to_export = array(); 3032 3033 foreach ( $location_props_to_export as $key => $name ) { 3034 if ( ! empty( $location[ $key ] ) ) { 3035 $location_data_to_export[] = array( 3036 'name' => $name, 3037 'value' => $location[ $key ], 3038 ); 3039 } 3040 } 3041 3042 $data_to_export[] = array( 3043 'group_id' => 'community-events-location', 3044 'group_label' => __( 'Community Events Location' ), 3045 'group_description' => __( 'User’s location data used for the Community Events in the WordPress Events and News dashboard widget.' ), 3046 'item_id' => "community-events-location-{$user->ID}", 3047 'data' => $location_data_to_export, 3048 ); 3049 } 3050 3015 3051 return array( 3016 3052 'data' => $data_to_export,
Note: See TracChangeset
for help on using the changeset viewer.