| @@ -381,12 +381,13 @@ | ||
| 381 | 381 | if ( empty( $_POST['translation'][ $language->slug ] ) || ! is_array( $_POST['translation'][ $language->slug ] ) ) { // In case the language filter is active ( thanks to John P. Bloch ) |
| 382 | 382 | continue; |
| 383 | 383 | } |
| 384 | 384 | |
| 385 | + $translations = array_map( 'trim', wp_unslash( $_POST['translation'][ $language->slug ] ) ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized | |
| 386 | + | |
| 385 | 387 | $mo = new PLL_MO(); |
| 386 | 388 | $mo->import_from_db( $language ); |
| 387 | 389 | |
| 388 | - $translations = array_map( 'trim', wp_unslash( $_POST['translation'][ $language->slug ] ) ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized | |
| 389 | 390 | foreach ( $translations as $key => $translation ) { |
| 390 | 391 | /** |
| 391 | 392 | * Filter the string translation before it is saved in DB |
| 392 | 393 | * Allows to sanitize strings registered with pll_register_string |