WordPress.org

Make WordPress Core

Ticket #44236: 44236.1.patch

File 44236.1.patch, 1.6 KB (added by GripsArt, 2 years ago)

added filter to the filename

  • 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        $html_report_filename = apply_filters( 'wp_personal_data_export_filename', $file_basename . '.html' );
    20472047        $html_report_pathname = wp_normalize_path( $exports_dir . $html_report_filename );
    20482048        $file                 = fopen( $html_report_pathname, 'w' );
    20492049        if ( false === $file ) {