Skip to content

Commit

Permalink
#96 Make it possible to filter on multiple values
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelw85 committed Jan 7, 2025
1 parent 316efc6 commit e5fa090
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Core_Language_Command.php
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ function ( $translation ) use ( $available, $current_locale, $updates ) {

foreach ( $translations as $key => $translation ) {
foreach ( array_keys( $translation ) as $field ) {
if ( isset( $assoc_args[ $field ] ) && $assoc_args[ $field ] !== $translation[ $field ] ) {
if ( isset( $assoc_args[ $field ] ) && ! in_array( $translation[ $field ], array_map( 'trim', explode( ',', $assoc_args[ $field ] ) ), true ) ) {
unset( $translations[ $key ] );
}
}
Expand Down

0 comments on commit e5fa090

Please sign in to comment.