Make WordPress Core

Ticket #44236: 44263.3.patch

File 44263.3.patch, 2.6 KB (added by GripsArt, 6 years ago)

changed docblock param as discussed

  • src/wp-admin/includes/file.php

     
    20432043        $stripped_email       = sanitize_title( $stripped_email ); // slugify the email address
    20442044        $obscura              = wp_generate_password( 32, false, false );
    20452045        $file_basename        = 'wp-personal-data-file-' . $stripped_email . '-' . $obscura;
    2046         $html_report_filename = $file_basename . '.html';
     2046
     2047        /**
     2048         * Filters the personal data export html filename
     2049         *
     2050         * @since 4.9.9
     2051         *
     2052         * @param string  $file_basename the personal data export file basename.
     2053         *
     2054         */
     2055        $html_report_filename = apply_filters( 'wp_personal_export_html_filename', $file_basename ) . '.html';
    20472056        $html_report_pathname = wp_normalize_path( $exports_dir . $html_report_filename );
    20482057        $file                 = fopen( $html_report_pathname, 'w' );
    20492058        if ( false === $file ) {
     
    21502159
    21512160        $zip = new ZipArchive;
    21522161        if ( true === $zip->open( $archive_pathname, ZipArchive::CREATE ) ) {
    2153                 if ( ! $zip->addFile( $html_report_pathname, 'index.html' ) ) {
     2162                if ( ! $zip->addFile( $html_report_pathname, $html_report_filename ) ) {
    21542163                        $error = __( 'Unable to add data to export file.' );
    21552164                }
    21562165