| @@ -33,10 +33,8 @@ | ||
| 33 | 33 | protected function save_translations( $post_id, $arr ) { |
| 34 | 34 | // Security check as 'wp_insert_post' can be called from outside WP admin |
| 35 | 35 | check_admin_referer( 'pll_language', '_pll_nonce' ); |
| 36 | 36 | |
| 37 | - $translations = array(); | |
| 38 | - | |
| 39 | 37 | // Save translations after checking the translated post is in the right language |
| 40 | 38 | foreach ( $arr as $lang => $tr_id ) { |
| 41 | 39 | $translations[ $lang ] = ( $tr_id && $this->model->post->get_language( (int) $tr_id )->slug == $lang ) ? (int) $tr_id : 0; |
| 42 | 40 | } |