PluginProbe
Polylang / 2.5
Polylang v2.5
3.8.9 3.8.8 3.8.7 3.8.6 3.8.5 3.8.4 3.8.3 2.7 2.7.0.1 2.7.1 2.7.2 2.7.3 2.7.4 2.8 2.8.1 2.8.2 2.8.3 2.8.4 2.9 2.9.1 2.9.2 3.0 3.0.1 3.0.2 3.0.3 All 233 releases
← All changes | admin/admin-filters-post-base.php +0 -5 2.92.5 View file →
@@ -1,8 +1,5 @@
1 1 <?php
2 -/**
3 - * @package Polylang
4 - */
5 2
6 3 /**
7 4 * Some common code for PLL_Admin_Filters_Post and PLL_Admin_Filters_Media
8 5 *
@@ -35,10 +32,8 @@
35 32 */
36 33 protected function save_translations( $post_id, $arr ) {
37 34 // Security check as 'wp_insert_post' can be called from outside WP admin
38 35 check_admin_referer( 'pll_language', '_pll_nonce' );
39 -
40 - $translations = array();
41 36
42 37 // Save translations after checking the translated post is in the right language
43 38 foreach ( $arr as $lang => $tr_id ) {
44 39 $translations[ $lang ] = ( $tr_id && $this->model->post->get_language( (int) $tr_id )->slug == $lang ) ? (int) $tr_id : 0;