v0.6.2
This commit is contained in:
parent
e9782eaa82
commit
6231118308
1 changed files with 48 additions and 24 deletions
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue