diff --git a/src/wp-admin/includes/file.php b/src/wp-admin/includes/file.php
index 4535684..935c12f 100644
|
a
|
b
|
function wp_privacy_generate_personal_data_export_file( $request_id ) {
|
| 2031 | 2031 | } |
| 2032 | 2032 | |
| 2033 | 2033 | // Protect export folder from browsing. |
| 2034 | | $index_pathname = $exports_dir . 'index.html'; |
| | 2034 | $index_pathname = $exports_dir . 'index.php'; |
| 2035 | 2035 | if ( ! file_exists( $index_pathname ) ) { |
| 2036 | 2036 | $file = fopen( $index_pathname, 'w' ); |
| 2037 | 2037 | if ( false === $file ) { |
| 2038 | 2038 | wp_send_json_error( __( 'Unable to protect export folder from browsing.' ) ); |
| 2039 | 2039 | } |
| 2040 | | fwrite( $file, 'Silence is golden.' ); |
| | 2040 | fwrite( $file, "<?php \n"); |
| | 2041 | fwrite( $file, "// Silence is golden." ); |
| 2041 | 2042 | fclose( $file ); |
| 2042 | 2043 | } |
| 2043 | 2044 | |
diff --git a/src/wp-includes/functions.php b/src/wp-includes/functions.php
index 60229ee..29c6c5d 100644
|
a
|
b
|
function wp_privacy_delete_old_export_files() {
|
| 6324 | 6324 | require_once( ABSPATH . 'wp-admin/includes/file.php' ); |
| 6325 | 6325 | |
| 6326 | 6326 | $exports_dir = wp_privacy_exports_dir(); |
| 6327 | | $export_files = list_files( $exports_dir, 100, array( 'index.html' ) ); |
| | 6327 | $export_files = list_files( $exports_dir, 100, array( 'index.php' ) ); |
| 6328 | 6328 | |
| 6329 | 6329 | /** |
| 6330 | 6330 | * Filters the lifetime, in seconds, of a personal data export file. |