Changeset 13474
- Timestamp:
- 05/08/2023 09:59:01 AM (17 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/11.0/src/bp-settings/bp-settings-functions.php
r13140 r13474 264 264 */ 265 265 function bp_settings_get_personal_data_expiration_date( WP_User_Request $request ) { 266 /** This filter is documented in wp- admin/includes/file.php */266 /** This filter is documented in wp-includes/functions.php */ 267 267 $expiration = apply_filters( 'wp_privacy_export_expiration', 3 * DAY_IN_SECONDS ); 268 268 … … 291 291 */ 292 292 function bp_settings_get_personal_data_export_url( WP_User_Request $request ) { 293 return get_post_meta( $request->ID, '_export_file_url', true ); 293 if ( ! bp_settings_personal_data_export_exists( $request ) ) { 294 return ''; 295 } 296 297 $file = get_post_meta( $request->ID, '_export_file_name', true ); 298 return wp_privacy_exports_url() . $file; 294 299 } 295 300 … … 303 308 */ 304 309 function bp_settings_personal_data_export_exists( WP_User_Request $request ) { 305 $file = get_post_meta( $request->ID, '_export_file_path', true ); 306 return file_exists( $file ); 310 $file = get_post_meta( $request->ID, '_export_file_name', true ); 311 if ( empty( $file ) ) { 312 return false; 313 } 314 315 return file_exists( wp_privacy_exports_dir() . $file ); 307 316 } 308 317
Note: See TracChangeset
for help on using the changeset viewer.