This commit is contained in:
Javier Casares 2026-08-18 16:29:50 +00:00
commit 6231118308

View file

@ -233,7 +233,11 @@ if ( ! class_exists( 'Robotstxt_Telemetry_WordPress_Api' ) ) {
}
/**
* Reduce translations payloads to the translation project dates.
* Reduce translations payloads to empty entries.
*
* Only the project and locale identifiers are kept (the API needs
* them to know which translations to check); all the translation
* metadata (dates, generators, versions) is removed.
*
* @param string $json Encoded translations payload.
* @return string
@ -254,11 +258,7 @@ if ( ! class_exists( 'Robotstxt_Telemetry_WordPress_Api' ) ) {
foreach ( $locales as $locale => $fields ) {
if ( is_array( $fields ) ) {
$kept = $this->keep_fields( $fields, array( 'pot-creation-date', 'po-revision-date' ) );
if ( ! empty( $kept ) ) {
$filtered[ $slug ][ $locale ] = $kept;
}
$filtered[ $slug ][ $locale ] = new stdClass();
}
}
}