Polylang - Version 1.7.10

Version Description

(2015-09-28) =

  • Add Occitan translation contributed by Cdric Valmary
  • Add de_DE_formal, en_NZ, es_CO, hy, oci, ps and tl to the predefined languages list
  • Add the filter 'pll_predefined_languages' and the actions 'pll_language_edit_form_fields' and 'pll_language_add_form_fields'
  • the termmeta table (used in Polylang < 1.2) is no more deleted when uninstalling the plugin (as it will soon be included in WP)
  • fix: prevent creating a media translation if one already exists
  • fix: Attempt to translate the nav menus for themes registering a theme location but not using it in wp_nav_menu()
  • fix: Jetpack infinite scroll
  • fix: issue with terms languages when two languages have the same name
  • fix: notices when deleting a tag and Lingotek is active
  • fix: the languages cache is not cleaned when updating the site home url
  • fix: conflict with the theme Ambition
  • fix: front page canonical url displayed by Yoast SEO
  • fix: typo in options definition at install props null.bit
  • fix: error when adding a term in a non-translated taxonomy
Download this release

Release Info

Developer Chouby
Plugin Icon 128x128 Polylang
Version 1.7.10
Comparing to
See all releases

Code changes from version 1.7.9 to 1.7.10

admin/admin-filters-columns.php CHANGED
@@ -249,26 +249,27 @@ class PLL_Admin_Filters_Columns {
249
  public function ajax_update_post_rows() {
250
  global $wp_list_table;
251
 
 
 
 
 
252
  check_ajax_referer('inlineeditnonce', '_pll_nonce');
253
 
254
  $x = new WP_Ajax_Response();
255
  $wp_list_table = _get_list_table( 'WP_Posts_List_Table', array( 'screen' => $_POST['screen'] ) );
256
 
257
- if (!post_type_exists($post_type = $_POST['post_type']))
258
- die(0);
259
-
260
  $translations = empty($_POST['translations']) ? array() : explode(',', $_POST['translations']); // collect old translations
261
  $translations = array_merge($translations, array($_POST['post_id'])); // add current post
262
  $translations = array_map('intval', $translations);
263
 
264
  foreach ($translations as $post_id) {
265
  $level = is_post_type_hierarchical( $post_type ) ? count( get_ancestors( $post_id, $post_type ) ) : 0;
266
- $post = get_post($post_id);
267
- ob_start();
268
- $wp_list_table->single_row( $post, $level );
269
- $data = ob_get_clean();
270
-
271
- $x->add(array('what' => 'row', 'data' => $data, 'supplemental' => array('post_id' => $post_id)));
272
  }
273
 
274
  $x->send();
@@ -282,14 +283,15 @@ class PLL_Admin_Filters_Columns {
282
  public function ajax_update_term_rows() {
283
  global $wp_list_table;
284
 
 
 
 
 
285
  check_ajax_referer('pll_language', '_pll_nonce');
286
 
287
  $x = new WP_Ajax_Response();
288
  $wp_list_table = _get_list_table( 'WP_Terms_List_Table', array( 'screen' => $_POST['screen'] ) );
289
 
290
- if (!taxonomy_exists($taxonomy = $_POST['taxonomy']))
291
- die(0);
292
-
293
  $translations = empty($_POST['translations']) ? array() : explode(',', $_POST['translations']); // collect old translations
294
  $translations = array_merge($translations, $this->model->get_translations('term', (int) $_POST['term_id'])); // add current translations
295
  $translations = array_unique($translations); // remove doublons
@@ -297,12 +299,12 @@ class PLL_Admin_Filters_Columns {
297
 
298
  foreach ($translations as $term_id) {
299
  $level = is_taxonomy_hierarchical($taxonomy) ? count( get_ancestors( $term_id, $taxonomy ) ) : 0;
300
- $tag = get_term($term_id, $taxonomy);
301
- ob_start();
302
- $wp_list_table->single_row( $tag, $level );
303
- $data = ob_get_clean();
304
-
305
- $x->add(array('what' => 'row', 'data' => $data, 'supplemental' => array('term_id' => $term_id)));
306
  }
307
 
308
  $x->send();
249
  public function ajax_update_post_rows() {
250
  global $wp_list_table;
251
 
252
+ if ( ! post_type_exists( $post_type = $_POST['post_type'] ) || ! $this->model->is_translated_post_type( $post_type ) ) {
253
+ die(0);
254
+ }
255
+
256
  check_ajax_referer('inlineeditnonce', '_pll_nonce');
257
 
258
  $x = new WP_Ajax_Response();
259
  $wp_list_table = _get_list_table( 'WP_Posts_List_Table', array( 'screen' => $_POST['screen'] ) );
260
 
 
 
 
261
  $translations = empty($_POST['translations']) ? array() : explode(',', $_POST['translations']); // collect old translations
262
  $translations = array_merge($translations, array($_POST['post_id'])); // add current post
263
  $translations = array_map('intval', $translations);
264
 
265
  foreach ($translations as $post_id) {
266
  $level = is_post_type_hierarchical( $post_type ) ? count( get_ancestors( $post_id, $post_type ) ) : 0;
267
+ if ($post = get_post($post_id)) {
268
+ ob_start();
269
+ $wp_list_table->single_row( $post, $level );
270
+ $data = ob_get_clean();
271
+ $x->add(array('what' => 'row', 'data' => $data, 'supplemental' => array('post_id' => $post_id)));
272
+ }
273
  }
274
 
275
  $x->send();
283
  public function ajax_update_term_rows() {
284
  global $wp_list_table;
285
 
286
+ if ( ! taxonomy_exists( $taxonomy = $_POST['taxonomy'] ) || ! $this->model->is_translated_taxonomy( $taxonomy ) ) {
287
+ die(0);
288
+ }
289
+
290
  check_ajax_referer('pll_language', '_pll_nonce');
291
 
292
  $x = new WP_Ajax_Response();
293
  $wp_list_table = _get_list_table( 'WP_Terms_List_Table', array( 'screen' => $_POST['screen'] ) );
294
 
 
 
 
295
  $translations = empty($_POST['translations']) ? array() : explode(',', $_POST['translations']); // collect old translations
296
  $translations = array_merge($translations, $this->model->get_translations('term', (int) $_POST['term_id'])); // add current translations
297
  $translations = array_unique($translations); // remove doublons
299
 
300
  foreach ($translations as $term_id) {
301
  $level = is_taxonomy_hierarchical($taxonomy) ? count( get_ancestors( $term_id, $taxonomy ) ) : 0;
302
+ if ($tag = get_term($term_id, $taxonomy)) {
303
+ ob_start();
304
+ $wp_list_table->single_row( $tag, $level );
305
+ $data = ob_get_clean();
306
+ $x->add(array('what' => 'row', 'data' => $data, 'supplemental' => array('term_id' => $term_id)));
307
+ }
308
  }
309
 
310
  $x->send();
admin/admin-filters-media.php CHANGED
@@ -104,6 +104,13 @@ class PLL_Admin_Filters_Media extends PLL_Admin_Filters_Post_Base {
104
  $post_id = $post->ID;
105
  $new_lang = $this->model->get_language($_GET['new_lang']); // make sure we get a valid language slug
106
 
 
 
 
 
 
 
 
107
  // create a new attachment (translate attachment parent if exists)
108
  $post->ID = null; // will force the creation
109
  $post->post_parent = ($post->post_parent && $tr_parent = $this->model->get_translation('post', $post->post_parent, $new_lang->slug)) ? $tr_parent : 0;
@@ -124,7 +131,7 @@ class PLL_Admin_Filters_Media extends PLL_Admin_Filters_Post_Base {
124
 
125
  do_action('pll_translate_media', $tr_id, $post, $translations);
126
 
127
- wp_redirect(admin_url(sprintf('post.php?post=%d&action=edit', $tr_id))); // WP 3.5+
128
  exit;
129
  }
130
 
104
  $post_id = $post->ID;
105
  $new_lang = $this->model->get_language($_GET['new_lang']); // make sure we get a valid language slug
106
 
107
+ // bails if the translations already exists
108
+ // see https://wordpress.org/support/topic/edit-translation-in-media-attachments?#post-7322303
109
+ if ( $this->model->get_translation( 'post', $post_id, $new_lang ) ) {
110
+ wp_safe_redirect( wp_get_referer() );
111
+ exit;
112
+ }
113
+
114
  // create a new attachment (translate attachment parent if exists)
115
  $post->ID = null; // will force the creation
116
  $post->post_parent = ($post->post_parent && $tr_parent = $this->model->get_translation('post', $post->post_parent, $new_lang->slug)) ? $tr_parent : 0;
131
 
132
  do_action('pll_translate_media', $tr_id, $post, $translations);
133
 
134
+ wp_safe_redirect(admin_url(sprintf('post.php?post=%d&action=edit', $tr_id))); // WP 3.5+
135
  exit;
136
  }
137
 
admin/admin-filters-post.php CHANGED
@@ -75,7 +75,7 @@ class PLL_Admin_Filters_Post extends PLL_Admin_Filters_Post_Base {
75
  }
76
  }
77
  }
78
-
79
  // hierarchical post types
80
  if ('edit' == $screen->base && is_post_type_hierarchical($screen->post_type)) {
81
  $pages = get_pages();
@@ -241,7 +241,7 @@ class PLL_Admin_Filters_Post extends PLL_Admin_Filters_Post_Base {
241
  'echo' => 0,
242
  );
243
  $dropdown_args = apply_filters( 'page_attributes_dropdown_pages_args', $dropdown_args, $post ); // since WP 3.3
244
-
245
  $x->Add(array('what' => 'pages', 'data' => wp_dropdown_pages( $dropdown_args )));
246
  }
247
 
@@ -261,10 +261,10 @@ class PLL_Admin_Filters_Post extends PLL_Admin_Filters_Post_Base {
261
 
262
  if (!post_type_exists($_REQUEST['post_type']))
263
  die(0);
264
-
265
  $post_language = $this->model->get_language($_REQUEST['post_language']);
266
  $translation_language = $this->model->get_language($_REQUEST['translation_language']);
267
-
268
  // don't order by title: see https://wordpress.org/support/topic/find-translated-post-when-10-is-not-enough
269
  $args = array(
270
  's' => wp_unslash($_REQUEST['term']),
@@ -279,7 +279,7 @@ class PLL_Admin_Filters_Post extends PLL_Admin_Filters_Post_Base {
279
  'terms' => $translation_language->term_taxonomy_id
280
  ))
281
  );
282
-
283
  // allow plugins to change args help fixing edge cases: see same topic as above
284
  $args = apply_filters('pll_ajax_posts_not_translated_args', $args);
285
  $posts = get_posts($args);
@@ -328,7 +328,7 @@ class PLL_Admin_Filters_Post extends PLL_Admin_Filters_Post_Base {
328
  // bulk edit does not modify the language
329
  if (isset($_REQUEST['bulk_edit']) && $_REQUEST['inline_lang_choice'] == -1) {
330
  check_admin_referer('bulk-posts');
331
- $lang = $this->model->get_post_language($post_id); // get the post language for later use when saving terms
332
  }
333
  // a language is set in the language dropdown
334
  else {
@@ -354,15 +354,10 @@ class PLL_Admin_Filters_Post extends PLL_Admin_Filters_Post_Base {
354
  }
355
  }
356
 
357
- // quick press
358
- // 'post-quickpress-save', 'post-quickpress-publish' = backward compatibility WP < 3.8
359
- elseif (isset($_REQUEST['action']) && in_array($_REQUEST['action'], array('post-quickpress-save', 'post-quickpress-publish', 'post-quickdraft-save'))) {
360
- check_admin_referer('add-' . $post->post_type);
361
- $this->model->set_post_language($post_id, $lang = $this->pref_lang); // default language for Quick draft
362
- }
363
-
364
- else
365
  $this->set_default_language($post_id);
 
366
 
367
  // make sure we get save terms in the right language (especially tags with same name in different languages)
368
  if (!empty($lang)) {
75
  }
76
  }
77
  }
78
+
79
  // hierarchical post types
80
  if ('edit' == $screen->base && is_post_type_hierarchical($screen->post_type)) {
81
  $pages = get_pages();
241
  'echo' => 0,
242
  );
243
  $dropdown_args = apply_filters( 'page_attributes_dropdown_pages_args', $dropdown_args, $post ); // since WP 3.3
244
+
245
  $x->Add(array('what' => 'pages', 'data' => wp_dropdown_pages( $dropdown_args )));
246
  }
247
 
261
 
262
  if (!post_type_exists($_REQUEST['post_type']))
263
  die(0);
264
+
265
  $post_language = $this->model->get_language($_REQUEST['post_language']);
266
  $translation_language = $this->model->get_language($_REQUEST['translation_language']);
267
+
268
  // don't order by title: see https://wordpress.org/support/topic/find-translated-post-when-10-is-not-enough
269
  $args = array(
270
  's' => wp_unslash($_REQUEST['term']),
279
  'terms' => $translation_language->term_taxonomy_id
280
  ))
281
  );
282
+
283
  // allow plugins to change args help fixing edge cases: see same topic as above
284
  $args = apply_filters('pll_ajax_posts_not_translated_args', $args);
285
  $posts = get_posts($args);
328
  // bulk edit does not modify the language
329
  if (isset($_REQUEST['bulk_edit']) && $_REQUEST['inline_lang_choice'] == -1) {
330
  check_admin_referer('bulk-posts');
331
+ $lang = $this->model->get_post_language($post_id); // get the post language for later use when saving terms
332
  }
333
  // a language is set in the language dropdown
334
  else {
354
  }
355
  }
356
 
357
+ // do not assign a language to 'auto-draft' posts as it would prevent set_default_language to correctly assign the first language
358
+ elseif ( 'auto-draft' != $post->post_status ) {
 
 
 
 
 
 
359
  $this->set_default_language($post_id);
360
+ }
361
 
362
  // make sure we get save terms in the right language (especially tags with same name in different languages)
363
  if (!empty($lang)) {
admin/languages.php CHANGED
@@ -19,13 +19,16 @@ $languages = array(
19
  array('da', 'da_DK', 'Dansk'),
20
  array('de', 'de_CH', 'Deutsch'),
21
  array('de', 'de_DE', 'Deutsch'),
 
22
  array('el', 'el', 'Ελληνικά'),
23
  array('en', 'en_AU', 'English'),
24
  array('en', 'en_CA', 'English'),
25
  array('en', 'en_GB', 'English'),
 
26
  array('en', 'en_US', 'English'),
27
  array('eo', 'eo', 'Esperanto'),
28
  array('es', 'es_CL', 'Español'),
 
29
  array('es', 'es_ES', 'Español'),
30
  array('es', 'es_MX', 'Español'),
31
  array('es', 'es_PE', 'Español'),
@@ -45,6 +48,7 @@ $languages = array(
45
  array('hi', 'hi_IN', 'हिन्दी'),
46
  array('hr', 'hr', 'Hrvatski'),
47
  array('hu', 'hu_HU', 'Magyar'),
 
48
  array('id', 'id_ID', 'Bahasa Indonesia'),
49
  array('is', 'is_IS', 'Íslenska'),
50
  array('it', 'it_IT', 'Italiano'),
@@ -65,7 +69,9 @@ $languages = array(
65
  array('ne', 'ne_NP', 'नेपाली'),
66
  array('nl', 'nl_NL', 'Nederlands'),
67
  array('nn', 'nn_NO', 'Norsk Nynorsk'),
 
68
  array('pl', 'pl_PL', 'Polski'),
 
69
  array('pt', 'pt_BR', 'Português'),
70
  array('pt', 'pt_PT', 'Português'),
71
  array('ro', 'ro_RO', 'Română'),
@@ -80,6 +86,7 @@ $languages = array(
80
  array('sv', 'sv_SE', 'Svenska'),
81
  array('ta', 'ta_LK', 'தமிழ்'),
82
  array('th', 'th', 'ไทย'),
 
83
  array('tr', 'tr_TR', 'Türkçe'),
84
  array('ug', 'ug_CN', 'Uyƣurqə'),
85
  array('uk', 'uk', 'Українська'),
@@ -91,3 +98,5 @@ $languages = array(
91
  array('zh', 'zh_HK', '中文 (香港)'),
92
  array('zh', 'zh_TW', '中文 (台灣)'),
93
  );
 
 
19
  array('da', 'da_DK', 'Dansk'),
20
  array('de', 'de_CH', 'Deutsch'),
21
  array('de', 'de_DE', 'Deutsch'),
22
+ array( 'de', 'de_DE_formal', 'Deutsch'),
23
  array('el', 'el', 'Ελληνικά'),
24
  array('en', 'en_AU', 'English'),
25
  array('en', 'en_CA', 'English'),
26
  array('en', 'en_GB', 'English'),
27
+ array( 'en', 'en_NZ', 'English'),
28
  array('en', 'en_US', 'English'),
29
  array('eo', 'eo', 'Esperanto'),
30
  array('es', 'es_CL', 'Español'),
31
+ array( 'es', 'es_CO', 'Español'),
32
  array('es', 'es_ES', 'Español'),
33
  array('es', 'es_MX', 'Español'),
34
  array('es', 'es_PE', 'Español'),
48
  array('hi', 'hi_IN', 'हिन्दी'),
49
  array('hr', 'hr', 'Hrvatski'),
50
  array('hu', 'hu_HU', 'Magyar'),
51
+ array( 'hy', 'hy', 'Հայերեն'),
52
  array('id', 'id_ID', 'Bahasa Indonesia'),
53
  array('is', 'is_IS', 'Íslenska'),
54
  array('it', 'it_IT', 'Italiano'),
69
  array('ne', 'ne_NP', 'नेपाली'),
70
  array('nl', 'nl_NL', 'Nederlands'),
71
  array('nn', 'nn_NO', 'Norsk Nynorsk'),
72
+ array( 'oc', 'oci', 'Occitan'),
73
  array('pl', 'pl_PL', 'Polski'),
74
+ array( 'ps', 'ps', 'پښتو', 'rtl'),
75
  array('pt', 'pt_BR', 'Português'),
76
  array('pt', 'pt_PT', 'Português'),
77
  array('ro', 'ro_RO', 'Română'),
86
  array('sv', 'sv_SE', 'Svenska'),
87
  array('ta', 'ta_LK', 'தமிழ்'),
88
  array('th', 'th', 'ไทย'),
89
+ array( 'tl', 'tl', 'Tagalog'),
90
  array('tr', 'tr_TR', 'Türkçe'),
91
  array('ug', 'ug_CN', 'Uyƣurqə'),
92
  array('uk', 'uk', 'Українська'),
98
  array('zh', 'zh_HK', '中文 (香港)'),
99
  array('zh', 'zh_TW', '中文 (台灣)'),
100
  );
101
+
102
+ $languages = apply_filters( 'pll_predefined_languages', $languages );
admin/view-tab-lang.php CHANGED
@@ -43,7 +43,7 @@
43
  '<option value="%1$s-%2$s-%3$s">%4$s - %2$s</option>'."\n",
44
  esc_attr($lg[0]),
45
  esc_attr($lg[1]),
46
- isset($lg[3]) ? '1' : '0',
47
  esc_html($lg[2])
48
  );
49
  } ?>
@@ -91,9 +91,16 @@
91
  <label for="lang_order"><?php _e('Order', 'polylang');?></label>
92
  <input name="term_group" id="lang_order" type="text" value="<?php if ($action=='edit') echo esc_attr($edit_lang->term_group);?>" />
93
  <p><?php _e('Position of the language in the language switcher', 'polylang');?></p>
94
- </div>
 
 
 
 
 
 
 
95
 
96
- <?php submit_button( $action == 'edit' ? __('Update') : __('Add new language', 'polylang')); // since WP 3.1 ?>
97
 
98
  </form>
99
  </div><!-- form-wrap -->
43
  '<option value="%1$s-%2$s-%3$s">%4$s - %2$s</option>'."\n",
44
  esc_attr($lg[0]),
45
  esc_attr($lg[1]),
46
+ isset( $lg[3] ) && 'rtl' == $lg[3] ? '1' : '0',
47
  esc_html($lg[2])
48
  );
49
  } ?>
91
  <label for="lang_order"><?php _e('Order', 'polylang');?></label>
92
  <input name="term_group" id="lang_order" type="text" value="<?php if ($action=='edit') echo esc_attr($edit_lang->term_group);?>" />
93
  <p><?php _e('Position of the language in the language switcher', 'polylang');?></p>
94
+ </div><?php
95
+
96
+ if ( 'edit' == $action ) {
97
+ do_action( 'pll_language_edit_form_fields', $edit_lang );
98
+ }
99
+ else {
100
+ do_action( 'pll_language_add_form_fields' );
101
+ }
102
 
103
+ submit_button( $action == 'edit' ? __('Update') : __('Add new language', 'polylang')); // since WP 3.1 ?>
104
 
105
  </form>
106
  </div><!-- form-wrap -->
flags/de_DE_formal.png ADDED
Binary file
flags/en_NZ.png ADDED
Binary file
flags/es_CO.png ADDED
Binary file
flags/hy.png ADDED
Binary file
flags/oci.png ADDED
Binary file
flags/ps.png ADDED
Binary file
flags/tl.png ADDED
Binary file
frontend/frontend-nav-menu.php CHANGED
@@ -25,6 +25,7 @@ class PLL_Frontend_Nav_Menu extends PLL_Nav_Menu {
25
 
26
  // filters menus by language
27
  add_filter('theme_mod_nav_menu_locations', array($this, 'nav_menu_locations'), 20);
 
28
  }
29
 
30
  /*
@@ -189,4 +190,47 @@ class PLL_Frontend_Nav_Menu extends PLL_Nav_Menu {
189
  }
190
  return $menus;
191
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
192
  }
25
 
26
  // filters menus by language
27
  add_filter('theme_mod_nav_menu_locations', array($this, 'nav_menu_locations'), 20);
28
+ add_filter( 'wp_nav_menu_args', array( &$this, 'wp_nav_menu_args' ) );
29
  }
30
 
31
  /*
190
  }
191
  return $menus;
192
  }
193
+
194
+ /*
195
+ * attempt to translate the nav menu when it is hardcoded or when no location is defined in wp_nav_menu
196
+ *
197
+ * @since 1.7.10
198
+ *
199
+ * @param array $args
200
+ * @return array modified $args
201
+ */
202
+ public function wp_nav_menu_args( $args ) {
203
+ $theme = get_option('stylesheet');
204
+
205
+ // Get the nav menu based on the requested menu
206
+ $menu = wp_get_nav_menu_object( $args['menu'] );
207
+
208
+ // attempt to find a translation of this menu
209
+ // this obviously does not work if the nav menu has no associated theme location
210
+ if ( $menu && ! empty( $this->curlang ) ) {
211
+ foreach ( $this->options['nav_menus'][ $theme ] as $menus ) {
212
+ if ( in_array( $menu->term_id, $menus ) && ! empty( $menus[ $this->curlang->slug ] ) ) {
213
+ $args['menu'] = $menus[ $this->curlang->slug ];
214
+ return $args;
215
+ }
216
+ }
217
+ }
218
+
219
+ // get the first menu that has items and and is in the current language if we still can't find a menu
220
+ if ( ! $menu && ! $args['theme_location'] && ! empty( $this->curlang ) ) {
221
+ $menus = wp_get_nav_menus();
222
+ foreach ( $menus as $menu_maybe ) {
223
+ if ( $menu_items = wp_get_nav_menu_items( $menu_maybe->term_id, array( 'update_post_term_cache' => false ) ) ) {
224
+ foreach ( $this->options['nav_menus'][ $theme ] as $menus ) {
225
+ if ( in_array( $menu_maybe->term_id, $menus ) && ! empty( $menus[ $this->curlang->slug ] ) ) {
226
+ $args['menu'] = $menus[ $this->curlang->slug ];
227
+ return $args;
228
+ }
229
+ }
230
+ }
231
+ }
232
+ }
233
+
234
+ return $args;
235
+ }
236
  }
include/model.php CHANGED
@@ -38,6 +38,8 @@ class PLL_Model {
38
  add_action('update_option_page_on_front', array(&$this, 'clean_languages_cache'));
39
  add_action('update_option_page_for_posts', array(&$this, 'clean_languages_cache'));
40
  add_action('update_option_permalink_structure', array(&$this, 'clean_languages_cache'));
 
 
41
 
42
  // registers completely the language taxonomy
43
  add_action('setup_theme', array(&$this, 'register_taxonomy'), 1);
@@ -155,12 +157,12 @@ class PLL_Model {
155
 
156
  $term_languages = get_terms('term_language', array('hide_empty' => false));
157
  $term_languages = empty($term_languages) || is_wp_error($term_languages) ?
158
- array() : array_combine(wp_list_pluck($term_languages, 'name'), $term_languages);
159
 
160
  if (!empty($languages) && !empty($term_languages)) {
161
  // don't use array_map + create_function to instantiate an autoloaded class as it breaks badly in old versions of PHP
162
  foreach ($languages as $k => $v) {
163
- $languages[$k] = new PLL_Language($v, $term_languages[$v->name]);
164
  }
165
 
166
  $languages = apply_filters('pll_languages_list', $languages);
38
  add_action('update_option_page_on_front', array(&$this, 'clean_languages_cache'));
39
  add_action('update_option_page_for_posts', array(&$this, 'clean_languages_cache'));
40
  add_action('update_option_permalink_structure', array(&$this, 'clean_languages_cache'));
41
+ add_action('update_option_siteurl', array(&$this, 'clean_languages_cache'));
42
+ add_action('update_option_home', array(&$this, 'clean_languages_cache'));
43
 
44
  // registers completely the language taxonomy
45
  add_action('setup_theme', array(&$this, 'register_taxonomy'), 1);
157
 
158
  $term_languages = get_terms('term_language', array('hide_empty' => false));
159
  $term_languages = empty($term_languages) || is_wp_error($term_languages) ?
160
+ array() : array_combine(wp_list_pluck($term_languages, 'slug'), $term_languages);
161
 
162
  if (!empty($languages) && !empty($term_languages)) {
163
  // don't use array_map + create_function to instantiate an autoloaded class as it breaks badly in old versions of PHP
164
  foreach ($languages as $k => $v) {
165
+ $languages[$k] = new PLL_Language($v, $term_languages['pll_' . $v->slug]);
166
  }
167
 
168
  $languages = apply_filters('pll_languages_list', $languages);
include/plugins-compat.php CHANGED
@@ -22,7 +22,7 @@ class PLL_Plugins_Compat {
22
  // just makes YARPP aware of the language taxonomy (after Polylang registered it)
23
  add_action('init', create_function('',"\$GLOBALS['wp_taxonomies']['language']->yarpp_support = 1;"), 20);
24
 
25
- // WordPress SEO by Yoast
26
  add_action('pll_language_defined', array(&$this, 'wpseo_init'));
27
 
28
  // Custom field template
@@ -32,13 +32,20 @@ class PLL_Plugins_Compat {
32
  add_filter('pll_home_url_black_list', create_function('$arr', "return array_merge(\$arr, array(array('function' => 'aq_resize')));"));
33
 
34
  // Twenty Fourteen
35
- add_filter('transient_featured_content_ids', array(&$this, 'twenty_fourteen_featured_content_ids'));
36
- add_filter('option_featured-content', array(&$this, 'twenty_fourteen_option_featured_content'));
 
 
37
 
38
  // Jetpack 3
39
  add_action('jetpack_widget_get_top_posts', array(&$this, 'jetpack_widget_get_top_posts'), 10, 3);
40
  add_filter('grunion_contact_form_field_html', array(&$this, 'grunion_contact_form_field_html_filter'), 10, 3);
41
  add_filter('jetpack_open_graph_tags', array(&$this, 'jetpack_ogp'));
 
 
 
 
 
42
  }
43
 
44
  /*
@@ -83,7 +90,7 @@ class PLL_Plugins_Compat {
83
  }
84
 
85
  /*
86
- * WordPress SEO by Yoast
87
  * translate options
88
  * add specific filters and actions
89
  *
@@ -113,7 +120,7 @@ class PLL_Plugins_Compat {
113
  // one sitemap per language when using multiple domains or subdomains
114
  // because WPSEO does not accept several domains or subdomains in one sitemap
115
  if ($polylang->options['force_lang'] > 1) {
116
- add_filter('wpseo_enable_xml_sitemap_transient_caching', '__return_false'); // disable cache! otherwise WPSEO keeps only one domain
117
  add_filter('home_url', array(&$this, 'wpseo_home_url'), 10, 2); // fix home_url
118
  add_filter('wpseo_posts_join', array(&$this, 'wpseo_posts_join'), 10, 2);
119
  add_filter('wpseo_posts_where', array(&$this, 'wpseo_posts_where'), 10, 2);
@@ -128,10 +135,11 @@ class PLL_Plugins_Compat {
128
 
129
  add_filter('pll_home_url_white_list', create_function('$arr', "return array_merge(\$arr, array(array('file' => 'wordpress-seo')));"));
130
  add_action('wpseo_opengraph', array(&$this, 'wpseo_ogp'), 2);
 
131
  }
132
 
133
  /*
134
- * WordPress SEO by Yoast
135
  * fixes the home url as well as the stylesheet url
136
  * only when using multiple domains or subdomains
137
  *
@@ -152,7 +160,7 @@ class PLL_Plugins_Compat {
152
  }
153
 
154
  /*
155
- * WordPress SEO by Yoast
156
  * modifies the sql request for posts sitemaps
157
  * only when using multiple domains or subdomains
158
  *
@@ -168,7 +176,7 @@ class PLL_Plugins_Compat {
168
  }
169
 
170
  /*
171
- * WordPress SEO by Yoast
172
  * modifies the sql request for posts sitemaps
173
  * only when using multiple domains or subdomains
174
  *
@@ -184,7 +192,7 @@ class PLL_Plugins_Compat {
184
  }
185
 
186
  /*
187
- * WordPress SEO by Yoast
188
  * removes the language filter for the taxonomy sitemaps
189
  * only when the language is set from the content or directory name
190
  *
@@ -200,7 +208,7 @@ class PLL_Plugins_Compat {
200
  }
201
 
202
  /*
203
- * WordPress SEO by Yoast
204
  * adds opengraph support for translations
205
  *
206
  * @since 1.6
@@ -218,6 +226,19 @@ class PLL_Plugins_Compat {
218
  }
219
  }
220
 
 
 
 
 
 
 
 
 
 
 
 
 
 
221
  /*
222
  * Custom field template does check $_REQUEST['post'] to populate the custom fields values
223
  *
22
  // just makes YARPP aware of the language taxonomy (after Polylang registered it)
23
  add_action('init', create_function('',"\$GLOBALS['wp_taxonomies']['language']->yarpp_support = 1;"), 20);
24
 
25
+ // Yoast SEO
26
  add_action('pll_language_defined', array(&$this, 'wpseo_init'));
27
 
28
  // Custom field template
32
  add_filter('pll_home_url_black_list', create_function('$arr', "return array_merge(\$arr, array(array('function' => 'aq_resize')));"));
33
 
34
  // Twenty Fourteen
35
+ if ( 'twentyfourteen' == get_template() ) {
36
+ add_filter('transient_featured_content_ids', array(&$this, 'twenty_fourteen_featured_content_ids'));
37
+ add_filter('option_featured-content', array(&$this, 'twenty_fourteen_option_featured_content'));
38
+ }
39
 
40
  // Jetpack 3
41
  add_action('jetpack_widget_get_top_posts', array(&$this, 'jetpack_widget_get_top_posts'), 10, 3);
42
  add_filter('grunion_contact_form_field_html', array(&$this, 'grunion_contact_form_field_html_filter'), 10, 3);
43
  add_filter('jetpack_open_graph_tags', array(&$this, 'jetpack_ogp'));
44
+
45
+ // Jetpack infinite scroll
46
+ if ( !defined( 'PLL_AJAX_ON_FRONT' ) && isset( $_GET['infinity'], $_POST['action'] ) && 'infinite_scroll' == $_POST['action'] ) {
47
+ define( 'PLL_AJAX_ON_FRONT', true );
48
+ }
49
  }
50
 
51
  /*
90
  }
91
 
92
  /*
93
+ * Yoast SEO
94
  * translate options
95
  * add specific filters and actions
96
  *
120
  // one sitemap per language when using multiple domains or subdomains
121
  // because WPSEO does not accept several domains or subdomains in one sitemap
122
  if ($polylang->options['force_lang'] > 1) {
123
+ add_filter('wpseo_enable_xml_sitemap_transient_caching', '__return_false'); // disable cache! otherwise WPSEO keeps only one domain (thanks to Junaid Bhura)
124
  add_filter('home_url', array(&$this, 'wpseo_home_url'), 10, 2); // fix home_url
125
  add_filter('wpseo_posts_join', array(&$this, 'wpseo_posts_join'), 10, 2);
126
  add_filter('wpseo_posts_where', array(&$this, 'wpseo_posts_where'), 10, 2);
135
 
136
  add_filter('pll_home_url_white_list', create_function('$arr', "return array_merge(\$arr, array(array('file' => 'wordpress-seo')));"));
137
  add_action('wpseo_opengraph', array(&$this, 'wpseo_ogp'), 2);
138
+ add_filter( 'wpseo_canonical', array( &$this, 'wpseo_canonical' ) );
139
  }
140
 
141
  /*
142
+ * Yoast SEO
143
  * fixes the home url as well as the stylesheet url
144
  * only when using multiple domains or subdomains
145
  *
160
  }
161
 
162
  /*
163
+ * Yoast SEO
164
  * modifies the sql request for posts sitemaps
165
  * only when using multiple domains or subdomains
166
  *
176
  }
177
 
178
  /*
179
+ * Yoast SEO
180
  * modifies the sql request for posts sitemaps
181
  * only when using multiple domains or subdomains
182
  *
192
  }
193
 
194
  /*
195
+ * Yoast SEO
196
  * removes the language filter for the taxonomy sitemaps
197
  * only when the language is set from the content or directory name
198
  *
208
  }
209
 
210
  /*
211
+ * Yoast SEO
212
  * adds opengraph support for translations
213
  *
214
  * @since 1.6
226
  }
227
  }
228
 
229
+ /*
230
+ * Yoast SEO
231
+ * fixes the canonical front page url as unlike WP, WPSEO does not add a trailing slash to the canonical front page url
232
+ *
233
+ * @since 1.7.10
234
+ *
235
+ * @param string $url
236
+ * @return $url
237
+ */
238
+ public function wpseo_canonical( $url ) {
239
+ return is_front_page( $url ) ? trailingslashit( $url ) : $url;
240
+ }
241
+
242
  /*
243
  * Custom field template does check $_REQUEST['post'] to populate the custom fields values
244
  *
install/install.php CHANGED
@@ -55,8 +55,8 @@ class PLL_Install extends PLL_Install_Base {
55
  'redirect_lang' => 0, // do not redirect the language page to the homepage
56
  'media_support' => 1, // support languages and translation for media by default
57
  'sync' => array(), // synchronisation is disabled by default (was the opposite before 1.2)
58
- 'post_types' => array_values(get_post_types(array('_builtin' => false, 'show_ui => true'))),
59
- 'taxonomies' => array_values(get_taxonomies(array('_builtin' => false, 'show_ui => true'))),
60
  'domains' => array(),
61
  'version' => POLYLANG_VERSION,
62
  );
55
  'redirect_lang' => 0, // do not redirect the language page to the homepage
56
  'media_support' => 1, // support languages and translation for media by default
57
  'sync' => array(), // synchronisation is disabled by default (was the opposite before 1.2)
58
+ 'post_types' => array_values(get_post_types(array('_builtin' => false, 'show_ui' => true))),
59
+ 'taxonomies' => array_values(get_taxonomies(array('_builtin' => false, 'show_ui' => true))),
60
  'domains' => array(),
61
  'version' => POLYLANG_VERSION,
62
  );
install/upgrade.php CHANGED
@@ -122,8 +122,8 @@ class PLL_Upgrade {
122
  $this->options['sync'] = empty($this->options['sync']) ? array() : array_keys(PLL_Settings::list_metas_to_sync());
123
 
124
  // set default values for post types and taxonomies to translate
125
- $this->options['post_types'] = array_values(get_post_types(array('_builtin' => false, 'show_ui => true')));
126
- $this->options['taxonomies'] = array_values(get_taxonomies(array('_builtin' => false, 'show_ui => true')));
127
  update_option('polylang', $this->options);
128
 
129
  flush_rewrite_rules(); // rewrite rules have been modified in 1.0
122
  $this->options['sync'] = empty($this->options['sync']) ? array() : array_keys(PLL_Settings::list_metas_to_sync());
123
 
124
  // set default values for post types and taxonomies to translate
125
+ $this->options['post_types'] = array_values(get_post_types(array('_builtin' => false, 'show_ui' => true)));
126
+ $this->options['taxonomies'] = array_values(get_taxonomies(array('_builtin' => false, 'show_ui' => true)));
127
  update_option('polylang', $this->options);
128
 
129
  flush_rewrite_rules(); // rewrite rules have been modified in 1.0
js/post.js CHANGED
@@ -82,7 +82,7 @@
82
  });
83
  }
84
  }
85
-
86
  // filter parent page dropdown list
87
  function filter_pages(lang) {
88
  if ("undefined" != typeof(pll_page_languages)) {
@@ -93,7 +93,7 @@
93
  });
94
  });
95
  }
96
- }
97
  });
98
  })(jQuery);
99
 
@@ -119,12 +119,14 @@
119
 
120
  // get the modified rows in ajax and update them
121
  $.post(ajaxurl, data, function(response) {
122
- var res = wpAjax.parseAjaxResponse(response, 'ajax-response');
123
- $.each(res.responses, function() {
124
- if ('row' == this.what) {
125
- $("#post-"+this.supplemental.post_id).replaceWith(this.data);
126
- }
127
- });
 
 
128
  });
129
  }
130
 
@@ -258,5 +260,4 @@ jQuery(document).ready(function($) {
258
  }
259
 
260
  init_translations();
261
-
262
  });
82
  });
83
  }
84
  }
85
+
86
  // filter parent page dropdown list
87
  function filter_pages(lang) {
88
  if ("undefined" != typeof(pll_page_languages)) {
93
  });
94
  });
95
  }
96
+ }
97
  });
98
  })(jQuery);
99
 
119
 
120
  // get the modified rows in ajax and update them
121
  $.post(ajaxurl, data, function(response) {
122
+ if (response) {
123
+ var res = wpAjax.parseAjaxResponse(response, 'ajax-response');
124
+ $.each(res.responses, function() {
125
+ if ('row' == this.what) {
126
+ $("#post-"+this.supplemental.post_id).replaceWith(this.data);
127
+ }
128
+ });
129
+ }
130
  });
131
  }
132
 
260
  }
261
 
262
  init_translations();
 
263
  });
js/post.min.js CHANGED
@@ -1 +1 @@
1
- (function(a){a.ajaxPrefilter(function(b,d,c){if(-1!==b.url.indexOf("action=ajax-tag-search")&&((lang=a("#post_lang_choice").val())||(lang=a(':input[name="inline_lang_choice"]').val()))){b.data="lang="+lang+"&"+b.data}})})(jQuery);(function(a){tagBox.get=function(d){var b=d.substr(d.indexOf("-")+1);var c={action:"get-tagcloud",lang:a("#post_lang_choice").val(),tax:b};a.post(ajaxurl,c,function(f,e){if(0==f||"success"!=e){f=wpAjax.broken}f=a('<p id="tagcloud-'+b+'" class="the-tagcloud">'+f+"</p>");a("a",f).click(function(){tagBox.flushTags(a(this).closest(".inside").children(".tagsdiv"),this);return false});if(v=a(".the-tagcloud").css("display")){a(".the-tagcloud").replaceWith(f);a(".the-tagcloud").css("display",v)}else{a("#"+d).after(f)}})}})(jQuery);(function(a){a(document).bind("DOMNodeInserted",function(h){var f=a(h.target);if("inline-edit"==f.attr("id")){var d=f.prev().attr("id").replace("post-","");if(d>0){var b=f.find(':input[name="inline_lang_choice"]');var i=a("#lang_"+d).html();b.val(i);g(i);c(i);b.change(function(){g(a(this).val());c(a(this).val())})}}function g(e){if("undefined"!=typeof(pll_term_languages)){a.each(pll_term_languages,function(j,k){a.each(k,function(l,m){a.each(m,function(n){id="#"+l+"-"+pll_term_languages[j][l][n];e==j?a(id).show():a(id).hide()})})})}}function c(e){if("undefined"!=typeof(pll_page_languages)){a.each(pll_page_languages,function(k,j){a.each(j,function(l){v=a('#post_parent option[value="'+pll_page_languages[k][l]+'"]');e==k?v.show():v.hide()})})}}})})(jQuery);(function(a){a(document).ajaxSuccess(function(d,f,c){function b(h){var g=new Array;a(".translation_"+h).each(function(){g.push(a(this).parent().parent().attr("id").substring(5))});var i={action:"pll_update_post_rows",post_id:h,translations:g.join(","),post_type:a("input[name='post_type']").val(),screen:a("input[name='screen']").val(),_pll_nonce:a("input[name='_inline_edit']").val()};a.post(ajaxurl,i,function(j){var k=wpAjax.parseAjaxResponse(j,"ajax-response");a.each(k.responses,function(){if("row"==this.what){a("#post-"+this.supplemental.post_id).replaceWith(this.data)}})})}var e=wpAjax.unserialize(c.data);if("undefined"!=typeof(e.action)&&"inline-save"==e.action){b(e.post_ID)}})})(jQuery);jQuery(document).ready(function(c){var b=new Array();c(".categorydiv").each(function(){var f=c(this).attr("id"),e,d;e=f.split("-");e.shift();d=e.join("-");b.push(d);c("#"+d+"-add-submit").before(c("<input />").attr("type","hidden").attr("id",d+"-lang").attr("name","term_lang_choice").attr("value",c("#post_lang_choice").val()))});c("#post_lang_choice").change(function(){var d={action:"post_lang_choice",lang:c(this).val(),taxonomies:b,post_id:c("#post_ID").val(),_pll_nonce:c("#_pll_nonce").val()};c.post(ajaxurl,d,function(e){var f=wpAjax.parseAjaxResponse(e,"ajax-response");c.each(f.responses,function(){switch(this.what){case"translations":c("#post-translations").html(this.data);a();break;case"taxonomy":var g=this.data;c("#"+g+"checklist").html(this.supplemental.all);c("#"+g+"checklist-pop").html(this.supplemental.populars);c("#new"+g+"_parent").replaceWith(this.supplemental.dropdown);c("#"+g+"-lang").val(c("#post_lang_choice").val());break;case"pages":c("#parent_id").html(this.data);break;case"flag":c(".pll-select-flag").html(this.data);break;default:break}});c(".tagcloud-link").each(function(){var g=c(this).attr("id");tagBox.get(g)})})});c(".media_lang_choice").change(function(){var d={action:"media_lang_choice",lang:c(this).val(),post_id:c(this).attr("name"),_pll_nonce:c("#_pll_nonce").val()};c.post(ajaxurl,d,function(e){var f=wpAjax.parseAjaxResponse(e,"ajax-response");c.each(f.responses,function(){switch(this.what){case"translations":c(".translations").html(this.data);c(".compat-field-translations").html(this.data);break;case"flag":c(".pll-select-flag").html(this.data);break;default:break}})})});function a(){c(".tr_lang").each(function(){var d=c(this).attr("id").substring(8);var e=c(this).parent().siblings(".pll-edit-column");c(this).autocomplete({minLength:0,source:ajaxurl+"?action=pll_posts_not_translated&post_language="+c("#post_lang_choice").val()+"&translation_language="+d+"&post_type="+c("#post_type").val()+"&_pll_nonce="+c("#_pll_nonce").val(),select:function(f,g){c("#htr_lang_"+d).val(g.item.id);e.html(g.item.link)}});c(this).blur(function(){if(!c(this).val()){c("#htr_lang_"+d).val(0);e.html(e.siblings(".hidden").children().clone())}})})}a()});
1
+ (function(a){a.ajaxPrefilter(function(b,d,c){if(-1!==b.url.indexOf("action=ajax-tag-search")&&((lang=a("#post_lang_choice").val())||(lang=a(':input[name="inline_lang_choice"]').val()))){b.data="lang="+lang+"&"+b.data}})})(jQuery);(function(a){tagBox.get=function(d){var b=d.substr(d.indexOf("-")+1);var c={action:"get-tagcloud",lang:a("#post_lang_choice").val(),tax:b};a.post(ajaxurl,c,function(f,e){if(0==f||"success"!=e){f=wpAjax.broken}f=a('<p id="tagcloud-'+b+'" class="the-tagcloud">'+f+"</p>");a("a",f).click(function(){tagBox.flushTags(a(this).closest(".inside").children(".tagsdiv"),this);return false});if(v=a(".the-tagcloud").css("display")){a(".the-tagcloud").replaceWith(f);a(".the-tagcloud").css("display",v)}else{a("#"+d).after(f)}})}})(jQuery);(function(a){a(document).bind("DOMNodeInserted",function(h){var f=a(h.target);if("inline-edit"==f.attr("id")){var d=f.prev().attr("id").replace("post-","");if(d>0){var b=f.find(':input[name="inline_lang_choice"]');var i=a("#lang_"+d).html();b.val(i);g(i);c(i);b.change(function(){g(a(this).val());c(a(this).val())})}}function g(e){if("undefined"!=typeof(pll_term_languages)){a.each(pll_term_languages,function(j,k){a.each(k,function(l,m){a.each(m,function(n){id="#"+l+"-"+pll_term_languages[j][l][n];e==j?a(id).show():a(id).hide()})})})}}function c(e){if("undefined"!=typeof(pll_page_languages)){a.each(pll_page_languages,function(k,j){a.each(j,function(l){v=a('#post_parent option[value="'+pll_page_languages[k][l]+'"]');e==k?v.show():v.hide()})})}}})})(jQuery);(function(a){a(document).ajaxSuccess(function(d,f,c){function b(h){var g=new Array;a(".translation_"+h).each(function(){g.push(a(this).parent().parent().attr("id").substring(5))});var i={action:"pll_update_post_rows",post_id:h,translations:g.join(","),post_type:a("input[name='post_type']").val(),screen:a("input[name='screen']").val(),_pll_nonce:a("input[name='_inline_edit']").val()};a.post(ajaxurl,i,function(j){if(j){var k=wpAjax.parseAjaxResponse(j,"ajax-response");a.each(k.responses,function(){if("row"==this.what){a("#post-"+this.supplemental.post_id).replaceWith(this.data)}})}})}var e=wpAjax.unserialize(c.data);if("undefined"!=typeof(e.action)&&"inline-save"==e.action){b(e.post_ID)}})})(jQuery);jQuery(document).ready(function(c){var b=new Array();c(".categorydiv").each(function(){var f=c(this).attr("id"),e,d;e=f.split("-");e.shift();d=e.join("-");b.push(d);c("#"+d+"-add-submit").before(c("<input />").attr("type","hidden").attr("id",d+"-lang").attr("name","term_lang_choice").attr("value",c("#post_lang_choice").val()))});c("#post_lang_choice").change(function(){var d={action:"post_lang_choice",lang:c(this).val(),taxonomies:b,post_id:c("#post_ID").val(),_pll_nonce:c("#_pll_nonce").val()};c.post(ajaxurl,d,function(e){var f=wpAjax.parseAjaxResponse(e,"ajax-response");c.each(f.responses,function(){switch(this.what){case"translations":c("#post-translations").html(this.data);a();break;case"taxonomy":var g=this.data;c("#"+g+"checklist").html(this.supplemental.all);c("#"+g+"checklist-pop").html(this.supplemental.populars);c("#new"+g+"_parent").replaceWith(this.supplemental.dropdown);c("#"+g+"-lang").val(c("#post_lang_choice").val());break;case"pages":c("#parent_id").html(this.data);break;case"flag":c(".pll-select-flag").html(this.data);break;default:break}});c(".tagcloud-link").each(function(){var g=c(this).attr("id");tagBox.get(g)})})});c(".media_lang_choice").change(function(){var d={action:"media_lang_choice",lang:c(this).val(),post_id:c(this).attr("name"),_pll_nonce:c("#_pll_nonce").val()};c.post(ajaxurl,d,function(e){var f=wpAjax.parseAjaxResponse(e,"ajax-response");c.each(f.responses,function(){switch(this.what){case"translations":c(".translations").html(this.data);c(".compat-field-translations").html(this.data);break;case"flag":c(".pll-select-flag").html(this.data);break;default:break}})})});function a(){c(".tr_lang").each(function(){var d=c(this).attr("id").substring(8);var e=c(this).parent().siblings(".pll-edit-column");c(this).autocomplete({minLength:0,source:ajaxurl+"?action=pll_posts_not_translated&post_language="+c("#post_lang_choice").val()+"&translation_language="+d+"&post_type="+c("#post_type").val()+"&_pll_nonce="+c("#_pll_nonce").val(),select:function(f,g){c("#htr_lang_"+d).val(g.item.id);e.html(g.item.link)}});c(this).blur(function(){if(!c(this).val()){c("#htr_lang_"+d).val(0);e.html(e.siblings(".hidden").children().clone())}})})}a()});
js/term.js CHANGED
@@ -46,12 +46,14 @@
46
 
47
  // get the modified rows in ajax and update them
48
  $.post(ajaxurl, data, function(response) {
49
- var res = wpAjax.parseAjaxResponse(response, 'ajax-response');
50
- $.each(res.responses, function() {
51
- if ('row' == this.what) {
52
- $("#tag-"+this.supplemental.term_id).replaceWith(this.data);
53
- }
54
- });
 
 
55
  });
56
  }
57
 
46
 
47
  // get the modified rows in ajax and update them
48
  $.post(ajaxurl, data, function(response) {
49
+ if (response) {
50
+ var res = wpAjax.parseAjaxResponse(response, 'ajax-response');
51
+ $.each(res.responses, function() {
52
+ if ('row' == this.what) {
53
+ $("#tag-"+this.supplemental.term_id).replaceWith(this.data);
54
+ }
55
+ });
56
+ }
57
  });
58
  }
59
 
js/term.min.js CHANGED
@@ -1 +1 @@
1
- (function(a){a(document).bind("DOMNodeInserted",function(f){var c=a(f.target);if("inline-edit"==c.attr("id")){var d=c.prev().attr("id").replace("tag-","");if(d>0){var b=c.find(':input[name="inline_lang_choice"]');var h=a("#lang_"+d).html();b.val(h);var g=a("#default_cat_"+d).html();if(d==g){b.prop("disabled",true)}}}})})(jQuery);(function(a){a(document).ajaxSuccess(function(d,f,c){function b(i){var g=new Array;a(".translation_"+i).each(function(){g.push(a(this).parent().parent().attr("id").substring(4))});var h={action:"pll_update_term_rows",term_id:i,translations:g.join(","),taxonomy:a("input[name='taxonomy']").val(),screen:a("input[name='screen']").val(),_pll_nonce:a("#_pll_nonce").val()};a.post(ajaxurl,h,function(j){var k=wpAjax.parseAjaxResponse(j,"ajax-response");a.each(k.responses,function(){if("row"==this.what){a("#tag-"+this.supplemental.term_id).replaceWith(this.data)}})})}var e=wpAjax.unserialize(c.data);if("undefined"!=typeof(e.action)){switch(e.action){case"add-tag":res=wpAjax.parseAjaxResponse(f.responseXML,"ajax-response");a.each(res.responses,function(){if("term"==this.what){b(this.supplemental.term_id)}});a(".htr_lang").val(0);break;case"delete-tag":b(e.tag_ID);break;case"inline-save-tax":b(e.tax_ID);break}}})})(jQuery);jQuery(document).ready(function(b){function a(){b(".tr_lang").each(function(){var c=b(this).attr("id").substring(8);var d=b(this).parent().siblings(".pll-edit-column");b(this).autocomplete({minLength:0,source:ajaxurl+"?action=pll_terms_not_translated&term_language="+b("#term_lang_choice").val()+"&term_id="+b("input[name='tag_ID']").val()+"&taxonomy="+b("input[name='taxonomy']").val()+"&translation_language="+c+"&post_type="+typenow+"&_pll_nonce="+b("#_pll_nonce").val(),select:function(e,f){b("#htr_lang_"+c).val(f.item.id);d.html(f.item.link)}});b(this).blur(function(){if(!b(this).val()){b("#htr_lang_"+c).val(0);d.html(d.siblings(".hidden").children().clone())}})})}a();b("#term_lang_choice").change(function(){var c={action:"term_lang_choice",lang:b(this).val(),from_tag:b("input[name='from_tag']").val(),term_id:b("input[name='tag_ID']").val(),taxonomy:b("input[name='taxonomy']").val(),post_type:typenow,_pll_nonce:b("#_pll_nonce").val()};b.post(ajaxurl,c,function(d){var e=wpAjax.parseAjaxResponse(d,"ajax-response");b.each(e.responses,function(){switch(this.what){case"translations":b("#term-translations").html(this.data);a();break;case"parent":b("#parent").replaceWith(this.data);break;case"tag_cloud":b(".tagcloud").replaceWith(this.data);break;case"flag":b(".pll-select-flag").html(this.data);break;default:break}})})})});
1
+ (function(a){a(document).bind("DOMNodeInserted",function(f){var c=a(f.target);if("inline-edit"==c.attr("id")){var d=c.prev().attr("id").replace("tag-","");if(d>0){var b=c.find(':input[name="inline_lang_choice"]');var h=a("#lang_"+d).html();b.val(h);var g=a("#default_cat_"+d).html();if(d==g){b.prop("disabled",true)}}}})})(jQuery);(function(a){a(document).ajaxSuccess(function(d,f,c){function b(i){var g=new Array;a(".translation_"+i).each(function(){g.push(a(this).parent().parent().attr("id").substring(4))});var h={action:"pll_update_term_rows",term_id:i,translations:g.join(","),taxonomy:a("input[name='taxonomy']").val(),screen:a("input[name='screen']").val(),_pll_nonce:a("#_pll_nonce").val()};a.post(ajaxurl,h,function(j){if(j){var k=wpAjax.parseAjaxResponse(j,"ajax-response");a.each(k.responses,function(){if("row"==this.what){a("#tag-"+this.supplemental.term_id).replaceWith(this.data)}})}})}var e=wpAjax.unserialize(c.data);if("undefined"!=typeof(e.action)){switch(e.action){case"add-tag":res=wpAjax.parseAjaxResponse(f.responseXML,"ajax-response");a.each(res.responses,function(){if("term"==this.what){b(this.supplemental.term_id)}});a(".htr_lang").val(0);break;case"delete-tag":b(e.tag_ID);break;case"inline-save-tax":b(e.tax_ID);break}}})})(jQuery);jQuery(document).ready(function(b){function a(){b(".tr_lang").each(function(){var c=b(this).attr("id").substring(8);var d=b(this).parent().siblings(".pll-edit-column");b(this).autocomplete({minLength:0,source:ajaxurl+"?action=pll_terms_not_translated&term_language="+b("#term_lang_choice").val()+"&term_id="+b("input[name='tag_ID']").val()+"&taxonomy="+b("input[name='taxonomy']").val()+"&translation_language="+c+"&post_type="+typenow+"&_pll_nonce="+b("#_pll_nonce").val(),select:function(e,f){b("#htr_lang_"+c).val(f.item.id);d.html(f.item.link)}});b(this).blur(function(){if(!b(this).val()){b("#htr_lang_"+c).val(0);d.html(d.siblings(".hidden").children().clone())}})})}a();b("#term_lang_choice").change(function(){var c={action:"term_lang_choice",lang:b(this).val(),from_tag:b("input[name='from_tag']").val(),term_id:b("input[name='tag_ID']").val(),taxonomy:b("input[name='taxonomy']").val(),post_type:typenow,_pll_nonce:b("#_pll_nonce").val()};b.post(ajaxurl,c,function(d){var e=wpAjax.parseAjaxResponse(d,"ajax-response");b.each(e.responses,function(){switch(this.what){case"translations":b("#term-translations").html(this.data);a();break;case"parent":b("#parent").replaceWith(this.data);break;case"tag_cloud":b(".tagcloud").replaceWith(this.data);break;case"flag":b(".pll-select-flag").html(this.data);break;default:break}})})})});
languages/polylang-oci.mo ADDED
Binary file
languages/polylang-oci.po ADDED
@@ -0,0 +1,675 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Cedric Valmary <cvalmary@yahoo.fr>, 2015.
2
+ msgid ""
3
+ msgstr ""
4
+ "Project-Id-Version: Polylang v1.6beta1\n"
5
+ "Report-Msgid-Bugs-To: \n"
6
+ "POT-Creation-Date: \n"
7
+ "PO-Revision-Date: 2015-08-27 11:23+0200\n"
8
+ "Last-Translator: director <cvalmary@yahoo.fr>\n"
9
+ "Language-Team: Tot en òc (totenoc.eu)\n"
10
+ "Language: oci\n"
11
+ "MIME-Version: 1.0\n"
12
+ "Content-Type: text/plain; charset=UTF-8\n"
13
+ "Content-Transfer-Encoding: 8bit\n"
14
+ "Plural-Forms: nplurals=2; plural=n>1;\n"
15
+ "X-Generator: Virtaal 0.7.1\n"
16
+ "X-Poedit-SourceCharset: UTF-8\n"
17
+ "X-Poedit-KeywordsList: __;_e;__ngettext:1,2;_n:1,2;__ngettext_noop:1,2;_n_noo"
18
+ "p:1,2;_c,_nc:4c,1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2\n"
19
+ "X-Poedit-Basepath: .\n"
20
+ "X-Textdomain-Support: yes\n"
21
+ "X-Poedit-SearchPath-0: ..\n"
22
+
23
+ # @ polylang
24
+ #: admin/view-about.php:3
25
+ #, php-format
26
+ msgid ""
27
+ "Polylang is provided with an extensive %sdocumentation%s (in English only). "
28
+ "It includes information on how to set up your multilingual site and use it "
29
+ "on a daily basis, a FAQ, as well as a documentation for programmers to adapt "
30
+ "their plugins and themes."
31
+ msgstr ""
32
+ "Polylang es provesit amb una %sdocumentation%s (en anglés). Explica cossí "
33
+ "installar vòstre site multilingüe e l&rsquo;utilizar al jorn lo jorn. Conten "
34
+ "tanben una FAQ e una documentacion per los desvelopaires lor permet d&rsquo;"
35
+ "adaptar lors extensions e lors tèmas."
36
+
37
+ # @ polylang
38
+ #: admin/view-about.php:9
39
+ #, php-format
40
+ msgid ""
41
+ "You will also find useful information in the %ssupport forum%s. However "
42
+ "don't forget to make a search before posting a new topic."
43
+ msgstr ""
44
+ "Podètz tanben trobar d&rsquo;informacions dins lo %sforum de supòrt%s (en "
45
+ "anglés). Pasmens, doblidetz pas de far una recèrca abans de publicar."
46
+
47
+ # @ polylang
48
+ #: admin/view-about.php:16
49
+ #, php-format
50
+ msgid ""
51
+ "Polylang is free of charge and is released under the same license as "
52
+ "WordPress, the %sGPL%s."
53
+ msgstr ""
54
+ "Polylang es gratuit e publicat jos la meteissa licéncia que WordPress, la "
55
+ "%sGPL%s."
56
+
57
+ # @ polylang
58
+ #: admin/view-about.php:22
59
+ #, php-format
60
+ msgid "If you wonder how you can help the project, just %sread this%s."
61
+ msgstr "Se volètz ajudar lo projècte, %slegissètz aquò%s."
62
+
63
+ # @ polylang
64
+ #: admin/view-about.php:27
65
+ msgid ""
66
+ "Finally if you like this plugin or if it helps your business, donations to "
67
+ "the author are greatly appreciated."
68
+ msgstr ""
69
+ "Enfin, se vos agrada aquesta extension o se vos ajuda dins vòstre business, "
70
+ "podètz far un don a l&rsquo;autor."
71
+
72
+ # @ polylang
73
+ #: admin/admin-filters-post.php:115 admin/admin.php:90 admin/settings.php:70
74
+ #: admin/settings.php:97 include/model.php:561
75
+ msgid "Languages"
76
+ msgstr "Lengas"
77
+
78
+ # @ polylang
79
+ #: include/switcher.php:22
80
+ msgid "Displays language names"
81
+ msgstr "Afichar lo nom de las lengas"
82
+
83
+ # @ polylang
84
+ #: include/switcher.php:23
85
+ msgid "Displays flags"
86
+ msgstr "Afichar las bandièras"
87
+
88
+ # @ polylang
89
+ #: include/switcher.php:24
90
+ msgid "Forces link to front page"
91
+ msgstr "Fòrça lo ligam cap a la pagina d&rsquo;acuèlh"
92
+
93
+ # @ polylang
94
+ #: include/switcher.php:25
95
+ msgid "Hides the current language"
96
+ msgstr "Amagar la lenga correnta"
97
+
98
+ # @ polylang
99
+ #: include/switcher.php:30
100
+ msgid "Displays as dropdown"
101
+ msgstr "Afichar en lista desenrotlanta"
102
+
103
+ # @ polylang
104
+ #: admin/admin.php:267
105
+ msgid "Filters content by language"
106
+ msgstr "Filtrar lo contengut per lenga"
107
+
108
+ # @ polylang
109
+ #: admin/admin.php:258
110
+ msgid "Show all languages"
111
+ msgstr "Afichar totas las lengas"
112
+
113
+ # @ polylang
114
+ #: admin/admin-filters-columns.php:140 admin/admin-filters-columns.php:230
115
+ msgid "Add new translation"
116
+ msgstr "Apondre una novèla traduccion"
117
+
118
+ # @ polylang
119
+ #: admin/admin-filters-columns.php:173 admin/admin-filters-media.php:55
120
+ #: admin/admin-filters-post.php:141 admin/admin-filters-term.php:75
121
+ #: admin/admin-filters-term.php:122 include/model.php:562
122
+ msgid "Language"
123
+ msgstr "Lenga"
124
+
125
+ # @ polylang
126
+ #: admin/table-string.php:112 admin/view-translations-media.php:5
127
+ #: admin/view-translations-post.php:5 admin/view-translations-term.php:6
128
+ #: admin/view-translations-term.php:11
129
+ msgid "Translations"
130
+ msgstr "Traduccions"
131
+
132
+ # @ polylang
133
+ #: admin/admin-filters-term.php:82 admin/admin-filters-term.php:130
134
+ msgid "Sets the language"
135
+ msgstr "Definís la lenga"
136
+
137
+ # @ polylang
138
+ #: admin/admin-filters.php:52
139
+ msgid "The widget is displayed for:"
140
+ msgstr "Afichar lo widget per&nbsp;:"
141
+
142
+ # @ polylang
143
+ #: admin/admin-filters.php:55 include/model.php:563
144
+ msgid "All languages"
145
+ msgstr "Totas las lengas"
146
+
147
+ # @ polylang
148
+ #: admin/admin-filters.php:123
149
+ msgid "Admin language"
150
+ msgstr "Lenga per l&rsquo;interfàcia d&rsquo;administracion"
151
+
152
+ # @ polylang
153
+ #: admin/admin-filters.php:126
154
+ msgid "WordPress default"
155
+ msgstr "Lenga per defaut de WordPress"
156
+
157
+ # @ polylang
158
+ #: admin/admin.php:167 admin/settings.php:102
159
+ msgid "Settings"
160
+ msgstr "Reglatges"
161
+
162
+ # @ polylang
163
+ #: admin/admin-filters.php:160 admin/admin-filters.php:169
164
+ msgid "Upgrading language files&#8230;"
165
+ msgstr "Mesa a jorn dels fichièrs de lengas&#8230;"
166
+
167
+ # @ polylang
168
+ #: admin/settings.php:62
169
+ msgid "About Polylang"
170
+ msgstr "A prepaus de Polylang"
171
+
172
+ # @ polylang
173
+ #: admin/settings.php:78
174
+ msgid "Strings translations"
175
+ msgstr "Traduccions de las cadenas"
176
+
177
+ # @ polylang
178
+ #: admin/settings.php:101
179
+ msgid "Strings translation"
180
+ msgstr "Traduccion de las cadenas"
181
+
182
+ # @ polylang
183
+ #: admin/admin-model.php:244
184
+ msgid "Enter a valid WordPress locale"
185
+ msgstr "Entratz un còde local WordPress valid"
186
+
187
+ # @ polylang
188
+ #: admin/admin-model.php:252
189
+ msgid "The language code must be unique"
190
+ msgstr "Lo còde de la lenga deu èsser unic"
191
+
192
+ # @ polylang
193
+ #: admin/admin-model.php:256
194
+ msgid "The language must have a name"
195
+ msgstr "La lenga deu aver un nom"
196
+
197
+ # @ polylang
198
+ #: admin/admin.php:367 admin/settings.php:180
199
+ msgid ""
200
+ "The language was created, but the WordPress language file was not "
201
+ "downloaded. Please install it manually."
202
+ msgstr ""
203
+ "La lenga es estada creada, mas lo fichièr de lenga WordPress a pas pogut "
204
+ "èsser telecargat. Mercé de l&rsquo;installar manualament."
205
+
206
+ # @ polylang
207
+ #: admin/admin-strings.php:59
208
+ msgid "Widget title"
209
+ msgstr "Títol del widget"
210
+
211
+ # @ polylang
212
+ #: admin/settings.php:319
213
+ msgid "Taxonomies"
214
+ msgstr "Taxinomias"
215
+
216
+ # @ polylang
217
+ #: admin/settings.php:320
218
+ msgid "Custom fields"
219
+ msgstr "Camps personalizats"
220
+
221
+ # @ polylang
222
+ #: admin/settings.php:321
223
+ msgid "Comment status"
224
+ msgstr "Autorizacion dels comentaris"
225
+
226
+ # @ polylang
227
+ #: admin/settings.php:322
228
+ msgid "Ping status"
229
+ msgstr "Autorizacion dels pings"
230
+
231
+ # @ polylang
232
+ #: admin/settings.php:323
233
+ msgid "Sticky posts"
234
+ msgstr "Articles meses en avant"
235
+
236
+ # @ polylang
237
+ #: admin/settings.php:324
238
+ msgid "Published date"
239
+ msgstr "Data de publicacion"
240
+
241
+ # @ polylang
242
+ #: admin/settings.php:325
243
+ msgid "Post format"
244
+ msgstr "Format"
245
+
246
+ # @ polylang
247
+ #: admin/settings.php:326
248
+ msgid "Page parent"
249
+ msgstr "Pagina parent"
250
+
251
+ # @ polylang
252
+ #: admin/settings.php:327
253
+ msgid "Page template"
254
+ msgstr "Modèl de pagina"
255
+
256
+ # @ polylang
257
+ #: admin/settings.php:328
258
+ msgid "Page order"
259
+ msgstr "Òrdre de las paginas"
260
+
261
+ # @ polylang
262
+ #: admin/settings.php:329
263
+ msgid "Featured image"
264
+ msgstr "Imatge a la Una"
265
+
266
+ # @ polylang
267
+ #: admin/view-tab-lang.php:21
268
+ msgid "Edit language"
269
+ msgstr "Modificar la lenga"
270
+
271
+ # @ polylang
272
+ #: admin/view-tab-lang.php:21 admin/view-tab-lang.php:96
273
+ msgid "Add new language"
274
+ msgstr "Apondre una novèla lenga"
275
+
276
+ # @ polylang
277
+ #: admin/view-tab-lang.php:37
278
+ msgid "Choose a language"
279
+ msgstr "Causir una lenga"
280
+
281
+ # @ polylang
282
+ #: admin/view-tab-lang.php:51
283
+ msgid "You can choose a language in the list or directly edit it below."
284
+ msgstr "Causissètz una lenga dins la lista o modificatz-la dirèctament çaijós."
285
+
286
+ # @ polylang
287
+ #: admin/table-languages.php:74 admin/view-tab-lang.php:55
288
+ msgid "Full name"
289
+ msgstr "Nom"
290
+
291
+ # @ polylang
292
+ #: admin/view-tab-lang.php:57
293
+ msgid "The name is how it is displayed on your site (for example: English)."
294
+ msgstr "Lo nom es utilizat un pauc pertot sul site (per exemple&nbsp;: Occitan)"
295
+
296
+ # @ polylang
297
+ #: admin/table-languages.php:75 admin/view-tab-lang.php:61
298
+ msgid "Locale"
299
+ msgstr "Còde local"
300
+
301
+ # @ polylang
302
+ #: admin/view-tab-lang.php:66
303
+ msgid ""
304
+ "WordPress Locale for the language (for example: en_US). You will need to "
305
+ "install the .mo file for this language."
306
+ msgstr ""
307
+ "Còde local utilizat per WordPress per la lenga (per exemple&nbsp;: oci). "
308
+ "Auretz besonh d&rsquo;installar los fichièrs .mo correspondent."
309
+
310
+ # @ polylang
311
+ #: admin/view-tab-lang.php:70
312
+ msgid "Language code"
313
+ msgstr "Còde de la lenga"
314
+
315
+ # @ polylang
316
+ #: admin/view-tab-lang.php:76
317
+ msgid "Text direction"
318
+ msgstr "Sistèma d&rsquo;escritura"
319
+
320
+ # @ polylang
321
+ #: admin/view-tab-lang.php:80
322
+ msgid "left to right"
323
+ msgstr "d&rsquo;esquèrra a drecha"
324
+
325
+ # @ polylang
326
+ #: admin/view-tab-lang.php:85
327
+ msgid "right to left"
328
+ msgstr "de drecha a esquèrra"
329
+
330
+ # @ polylang
331
+ #: admin/view-tab-lang.php:87
332
+ msgid "Choose the text direction for the language"
333
+ msgstr "Causir lo sistèma d&rsquo;escritura per la lenga"
334
+
335
+ # @ polylang
336
+ #: admin/table-languages.php:77 admin/view-tab-lang.php:91
337
+ msgid "Order"
338
+ msgstr "Òrdre"
339
+
340
+ # @ polylang
341
+ #: admin/view-tab-lang.php:93
342
+ msgid "Position of the language in the language switcher"
343
+ msgstr "Posicion de la lenga dins la lista de lengas"
344
+
345
+ # @ polylang
346
+ #: admin/admin-nav-menu.php:54 admin/admin-nav-menu.php:92
347
+ #: admin/admin-nav-menu.php:95 admin/admin-nav-menu.php:126
348
+ #: admin/admin-nav-menu.php:188 install/upgrade.php:301
349
+ msgid "Language switcher"
350
+ msgstr "Lista de las lengas"
351
+
352
+ # @ polylang
353
+ #: admin/view-tab-strings.php:8
354
+ msgid "Search translations"
355
+ msgstr "Cercar dins las traduccions"
356
+
357
+ # @ polylang
358
+ #: admin/view-tab-strings.php:11
359
+ msgid "Clean strings translation database"
360
+ msgstr "Netejar las cadenas de traduccion de la banca de donadas"
361
+
362
+ # @ polylang
363
+ #: admin/view-tab-settings.php:14
364
+ msgid "Default language"
365
+ msgstr "Lenga per defaut"
366
+
367
+ # @ polylang
368
+ #: admin/view-tab-settings.php:29
369
+ msgid ""
370
+ "There are posts, pages, categories or tags without language set. Do you want "
371
+ "to set them all to default language ?"
372
+ msgstr ""
373
+ "I a d&rsquo;articles, paginas, categorias o etiquetas sens jòc de lenga. Lor "
374
+ "volètz atribuir la lenga per defaut&nbsp;?"
375
+
376
+ # @ polylang
377
+ #: admin/view-tab-settings.php:149
378
+ msgid "Detect browser language"
379
+ msgstr "Detectar la lenga del navigador"
380
+
381
+ # @ polylang
382
+ #: admin/view-tab-settings.php:155
383
+ msgid ""
384
+ "When the front page is visited, set the language according to the browser "
385
+ "preference"
386
+ msgstr ""
387
+ "Quand la pagina d&rsquo;acuèlh es visitada, lo visitor es redirigit en "
388
+ "foncion de las preferéncias de lenga de son navigador"
389
+
390
+ # @ polylang
391
+ #: admin/view-tab-settings.php:37
392
+ msgid "URL modifications"
393
+ msgstr "Modificacions de las URL"
394
+
395
+ # @ polylang
396
+ #: admin/view-tab-settings.php:93
397
+ msgid "Hide URL language information for default language"
398
+ msgstr ""
399
+ "Amagar l&rsquo;informacion de lenga dins l&rsquo;URL per la lenga per defaut"
400
+
401
+ # @ polylang
402
+ #: admin/view-tab-settings.php:162
403
+ msgid "Media"
404
+ msgstr "Mèdias"
405
+
406
+ # @ polylang
407
+ #: admin/view-tab-settings.php:168
408
+ msgid "Activate languages and translations for media"
409
+ msgstr "Activar la gestion de las lengas e de las traduccions per los mèdias."
410
+
411
+ # @ polylang
412
+ #: admin/view-tab-settings.php:215
413
+ msgid "Synchronization"
414
+ msgstr "Sincronizacion"
415
+
416
+ # @ polylang
417
+ #: admin/view-tab-settings.php:176
418
+ msgid "Custom post types"
419
+ msgstr "Tipes de contengut personalizat"
420
+
421
+ # @ polylang
422
+ #: admin/view-tab-settings.php:189
423
+ msgid "Activate languages and translations for custom post types."
424
+ msgstr ""
425
+ "Activar la gestion de las lengas e de las traduccions per los tipes de "
426
+ "contengut."
427
+
428
+ # @ polylang
429
+ #: admin/view-tab-settings.php:196
430
+ msgid "Custom taxonomies"
431
+ msgstr "Taxinomias"
432
+
433
+ # @ polylang
434
+ #: admin/view-tab-settings.php:209
435
+ msgid "Activate languages and translations for custom taxonomies."
436
+ msgstr ""
437
+ "Activar la gestion de las lengas e de las traduccions per las taxinomias."
438
+
439
+ # @ polylang
440
+ #: admin/admin-filters-post.php:433 admin/admin-filters-term.php:642
441
+ #: admin/table-languages.php:54 admin/view-translations-media.php:21
442
+ msgid "Edit"
443
+ msgstr "Modificar"
444
+
445
+ # @ polylang
446
+ #: admin/table-languages.php:60 admin/table-string.php:168
447
+ msgid "Delete"
448
+ msgstr "Suprimir"
449
+
450
+ # @ polylang
451
+ #: admin/table-languages.php:76
452
+ msgid "Code"
453
+ msgstr "Còde"
454
+
455
+ # @ polylang
456
+ #: admin/table-languages.php:78
457
+ msgid "Flag"
458
+ msgstr "Bandièra"
459
+
460
+ # @ polylang
461
+ #: admin/table-languages.php:79
462
+ msgid "Posts"
463
+ msgstr "Articles"
464
+
465
+ # @ polylang
466
+ #: admin/table-string.php:110
467
+ msgid "Name"
468
+ msgstr "Nom"
469
+
470
+ # @ polylang
471
+ #: admin/table-string.php:111
472
+ msgid "String"
473
+ msgstr "Cadena"
474
+
475
+ # @ polylang
476
+ #: admin/view-translations-media.php:30 admin/view-translations-post.php:21
477
+ #: admin/view-translations-term.php:30
478
+ msgid "Add new"
479
+ msgstr "Apondre"
480
+
481
+ # @ polylang
482
+ #: include/widget-languages.php:16
483
+ msgid "Language Switcher"
484
+ msgstr "Lista de las lengas"
485
+
486
+ # @ polylang
487
+ #: include/widget-languages.php:16
488
+ msgid "Displays a language switcher"
489
+ msgstr "Afichar la lista de las lengas"
490
+
491
+ # @ polylang
492
+ #: include/widget-languages.php:75
493
+ msgid "Title:"
494
+ msgstr "Títol&nbsp;:"
495
+
496
+ # @ polylang
497
+ #. translators: plugin header field 'Description'
498
+ #: polylang.php:0
499
+ msgid "Adds multilingual capability to WordPress"
500
+ msgstr "Permet una utilizacion multilingüa de WordPress"
501
+
502
+ # @ polylang
503
+ #: install/install.php:24
504
+ #, php-format
505
+ msgid "You are using WordPress %s. Polylang requires at least WordPress %s."
506
+ msgstr "Utilizatz WordPress %s. Polylang necessita al mens WordPress %s."
507
+
508
+ # @ polylang
509
+ #: install/upgrade.php:76
510
+ msgid ""
511
+ "Polylang has been deactivated because you upgraded from a too old version."
512
+ msgstr ""
513
+ "Polylang es estat desactivat perque avètz fach una mesa a jorn dempuèi una "
514
+ "version tròp anciana."
515
+
516
+ # @ polylang
517
+ #: install/upgrade.php:78
518
+ #, php-format
519
+ msgid "Please upgrade first to %s before ugrading to %s."
520
+ msgstr "D&rsquo;en primièr, metètz a jorn en %s abans de metre a jorn en %s."
521
+
522
+ # @ polylang
523
+ #: admin/table-string.php:109
524
+ msgid "Group"
525
+ msgstr "Grop"
526
+
527
+ # @ polylang
528
+ #: admin/table-string.php:187
529
+ msgid "View all groups"
530
+ msgstr "Veire totes los gropes"
531
+
532
+ # @ polylang
533
+ #: admin/table-languages.php:59
534
+ msgid "You are about to permanently delete this language. Are you sure?"
535
+ msgstr "Sètz segur que volètz suprimir aquesta lenga definitivament&nbsp;?"
536
+
537
+ # @ polylang
538
+ #: admin/view-tab-strings.php:12
539
+ msgid ""
540
+ "Use this to remove unused strings from database, for example after a plugin "
541
+ "has been uninstalled."
542
+ msgstr ""
543
+ "Utilizatz aquesta opcion per suprimir las frasas inutilas dins la banca de "
544
+ "donadas, per exemple aprèp aver desinstallat una extension."
545
+
546
+ # @ polylang
547
+ #: admin/view-tab-settings.php:226
548
+ msgid ""
549
+ "The synchronization options allow to maintain exact same values (or "
550
+ "translations in the case of taxonomies and page parent) of meta content "
551
+ "between the translations of a post or page."
552
+ msgstr ""
553
+ "Las opcions de sincronizacion permeton de manténer las meteissas valors de "
554
+ "metacontenguts entre las traduccions d&rsquo;un article o d&rsquo;une pagina "
555
+ "(o de las tradusir dins lo cas de las taxinomias e de la pagina parent)"
556
+
557
+ # @ polylang
558
+ #: admin/admin-model.php:248
559
+ msgid "The language code contains invalid characters"
560
+ msgstr "Lo còde de la lenga conten de caractèrs invalids"
561
+
562
+ # @ polylang
563
+ #: admin/view-tab-settings.php:43
564
+ msgid "The language is set from content"
565
+ msgstr "La lenga es determinada pel contengut"
566
+
567
+ # @ polylang
568
+ #: admin/view-tab-settings.php:46
569
+ msgid "Posts, pages, categories and tags urls are not modified."
570
+ msgstr ""
571
+ "Las adreças dels articles, paginas, categorias e mots claus son pas "
572
+ "modificadas."
573
+
574
+ # @ polylang
575
+ #: admin/view-tab-settings.php:51
576
+ msgid "The language is set from the directory name in pretty permalinks"
577
+ msgstr "La lenga es determinada pel nom del repertòri dins los permaligams"
578
+
579
+ # @ polylang
580
+ #: admin/view-tab-settings.php:54 admin/view-tab-settings.php:63
581
+ #: admin/view-tab-settings.php:110 admin/view-tab-settings.php:119
582
+ msgid "Example:"
583
+ msgstr "Exemple&nbsp;:"
584
+
585
+ # @ polylang
586
+ #: admin/view-tab-settings.php:60
587
+ msgid "The language is set from the subdomain name in pretty permalinks"
588
+ msgstr "La lenga es determinada pel sosdomeni dins los permaligams"
589
+
590
+ # @ polylang
591
+ #: admin/view-tab-settings.php:69
592
+ msgid "The language is set from different domains"
593
+ msgstr "La lenga es determinada per de noms de domeni diferents"
594
+
595
+ # @ polylang
596
+ #: admin/view-tab-settings.php:107
597
+ msgid "Remove /language/ in pretty permalinks"
598
+ msgstr "Suprimir /language/ dins los permaligams"
599
+
600
+ # @ polylang
601
+ #: admin/view-tab-settings.php:116
602
+ msgid "Keep /language/ in pretty permalinks"
603
+ msgstr "Conservar /language/ dins los permaligams"
604
+
605
+ # @ polylang
606
+ #: admin/view-tab-settings.php:131
607
+ msgid ""
608
+ "The front page url contains the language code instead of the page name or "
609
+ "page id"
610
+ msgstr ""
611
+ "L'adreça de la pagina d'acuèlh conten lo còde de la lenga al luòc del nom de "
612
+ "la pagina"
613
+
614
+ # @ polylang
615
+ #: admin/view-tab-settings.php:139
616
+ #, php-format
617
+ msgid "Example: %s instead of %s"
618
+ msgstr "Exemple : %s al luòc de %s"
619
+
620
+ # @ polylang
621
+ #: admin/admin-model.php:38
622
+ msgid "Impossible to add the language."
623
+ msgstr "Impossible d'apondre la lenga."
624
+
625
+ # @ polylang
626
+ #: admin/admin-model.php:66
627
+ msgid "Language added."
628
+ msgstr "Lenga aponduda."
629
+
630
+ # @ polylang
631
+ #: admin/admin-model.php:146
632
+ msgid "Language deleted."
633
+ msgstr "Lenga suprimida."
634
+
635
+ # @ polylang
636
+ #: admin/admin-model.php:227
637
+ msgid "Language updated."
638
+ msgstr "Lenga mesa a jorn."
639
+
640
+ # @ polylang
641
+ #: admin/settings.php:239
642
+ msgid "Translations updated."
643
+ msgstr "Traduccions mesas a jorn."
644
+
645
+ # @ polylang
646
+ #: admin/view-tab-lang.php:72
647
+ msgid "Language code - preferably 2-letters ISO 639-1 (for example: en)"
648
+ msgstr ""
649
+ "Còde de lenga, de preferéncia còde ISO 639-1 a 2 letras (per exemple&nbsp;: "
650
+ "fr)"
651
+
652
+ # @ polylang
653
+ #: admin/admin-filters.php:203
654
+ msgid "The chosen static front page must be translated in all languages."
655
+ msgstr "La pagina d'acuèlh estatica deu èsser tradusida dins totas las lengas."
656
+
657
+ # @ polylang
658
+ #: admin/admin-strings.php:60
659
+ msgid "Widget text"
660
+ msgstr "Widget tèxte"
661
+
662
+ # @ polylang
663
+ #: admin/settings.php:52
664
+ msgid "Recommended plugins"
665
+ msgstr "Extensions recomandadas"
666
+
667
+ # @ polylang
668
+ #: admin/view-tab-settings.php:51
669
+ msgid "The language is set from the code in the URL"
670
+ msgstr "La lenga es determinada pel còde dins l'URL"
671
+
672
+ # @ polylang
673
+ #: include/switcher.php:26
674
+ msgid "Hides languages with no translation"
675
+ msgstr "Amagar las lengas sens traduccion"
polylang.php CHANGED
@@ -2,7 +2,7 @@
2
  /*
3
  Plugin Name: Polylang
4
  Plugin URI: http://polylang.wordpress.com/
5
- Version: 1.7.9
6
  Author: Frédéric Demarle
7
  Author uri: http://polylang.wordpress.com
8
  Description: Adds multilingual capability to WordPress
@@ -34,7 +34,7 @@ Domain Path: /languages
34
  if (!function_exists('add_action'))
35
  exit();
36
 
37
- define('POLYLANG_VERSION', '1.7.9');
38
  define('PLL_MIN_WP_VERSION', '3.9');
39
 
40
  define('POLYLANG_BASENAME', plugin_basename(__FILE__)); // plugin name as known by WP
2
  /*
3
  Plugin Name: Polylang
4
  Plugin URI: http://polylang.wordpress.com/
5
+ Version: 1.7.10
6
  Author: Frédéric Demarle
7
  Author uri: http://polylang.wordpress.com
8
  Description: Adds multilingual capability to WordPress
34
  if (!function_exists('add_action'))
35
  exit();
36
 
37
+ define('POLYLANG_VERSION', '1.7.10');
38
  define('PLL_MIN_WP_VERSION', '3.9');
39
 
40
  define('POLYLANG_BASENAME', plugin_basename(__FILE__)); // plugin name as known by WP
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_i
4
  Tags: multilingual, bilingual, translate, translation, language, multilanguage, international, localization
5
  Requires at least: 3.9
6
  Tested up to: 4.3
7
- Stable tag: 1.7.9
8
  License: GPLv2 or later
9
 
10
  Making WordPress multilingual
@@ -26,7 +26,7 @@ Polylang allows you to create a bilingual or multilingual WordPress site. You wr
26
 
27
  = Translators =
28
 
29
- The plugin admin interface is currently available in 40 languages:
30
 
31
  * English
32
  * French by [fxbenard](http://fxbenard.com/)
@@ -68,6 +68,7 @@ The plugin admin interface is currently available in 40 languages:
68
  * Galician by [Toño Calo](http://fedellar.wordpress.com/)
69
  * Romanian by uskro
70
  * Japanese by [Eiko Toda](http://www.eikotoda.com)
 
71
 
72
  = Credits =
73
 
@@ -111,6 +112,23 @@ See http://polylang.wordpress.com/documentation/contribute/
111
 
112
  == Changelog ==
113
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
114
  = 1.7.9 (2015-08-17) =
115
 
116
  * Minimum WordPress version is now v3.9
4
  Tags: multilingual, bilingual, translate, translation, language, multilanguage, international, localization
5
  Requires at least: 3.9
6
  Tested up to: 4.3
7
+ Stable tag: 1.7.10
8
  License: GPLv2 or later
9
 
10
  Making WordPress multilingual
26
 
27
  = Translators =
28
 
29
+ The plugin admin interface is currently available in 41 languages:
30
 
31
  * English
32
  * French by [fxbenard](http://fxbenard.com/)
68
  * Galician by [Toño Calo](http://fedellar.wordpress.com/)
69
  * Romanian by uskro
70
  * Japanese by [Eiko Toda](http://www.eikotoda.com)
71
+ * Occitan by [Cédric Valmary](http://www.totenoc.eu/)
72
 
73
  = Credits =
74
 
112
 
113
  == Changelog ==
114
 
115
+ = 1.7.10 (2015-09-28) =
116
+
117
+ * Add Occitan translation contributed by [Cédric Valmary](http://www.totenoc.eu/)
118
+ * Add de_DE_formal, en_NZ, es_CO, hy, oci, ps and tl to the predefined languages list
119
+ * Add the filter 'pll_predefined_languages' and the actions 'pll_language_edit_form_fields' and 'pll_language_add_form_fields'
120
+ * the termmeta table (used in Polylang < 1.2) is no more deleted when uninstalling the plugin (as it will soon be included in WP)
121
+ * fix: prevent creating a media translation if one already exists
122
+ * fix: Attempt to translate the nav menus for themes registering a theme location but not using it in wp_nav_menu()
123
+ * fix: Jetpack infinite scroll
124
+ * fix: issue with terms languages when two languages have the same name
125
+ * fix: notices when deleting a tag and Lingotek is active
126
+ * fix: the languages cache is not cleaned when updating the site home url
127
+ * fix: conflict with the theme Ambition
128
+ * fix: front page canonical url displayed by Yoast SEO
129
+ * fix: typo in options definition at install [props null.bit](https://wordpress.org/support/topic/suggestions-for-two-new-filters?replies=5#post-7466159)
130
+ * fix: error when adding a term in a non-translated taxonomy
131
+
132
  = 1.7.9 (2015-08-17) =
133
 
134
  * Minimum WordPress version is now v3.9
uninstall.php CHANGED
@@ -49,13 +49,8 @@ class PLL_Uninstall {
49
  $wpdb->query("DELETE FROM $wpdb->termmeta WHERE meta_key = '_language'");
50
  $wpdb->query("DELETE FROM $wpdb->termmeta WHERE meta_key = '_rtl'");
51
  $wpdb->query("DELETE FROM $wpdb->termmeta WHERE meta_key = '_translations'");
52
-
53
- // delete the termmeta table only if it is empty as other plugins may use it
54
- if (!$wpdb->get_var("SELECT COUNT(*) FROM $wpdb->termmeta;"))
55
- $wpdb->query("DROP TABLE $wpdb->termmeta;");
56
  }
57
 
58
-
59
  // need to register the taxonomies
60
  $pll_taxonomies = array('language', 'term_language', 'post_translations', 'term_translations');
61
  foreach ($pll_taxonomies as $taxonomy)
49
  $wpdb->query("DELETE FROM $wpdb->termmeta WHERE meta_key = '_language'");
50
  $wpdb->query("DELETE FROM $wpdb->termmeta WHERE meta_key = '_rtl'");
51
  $wpdb->query("DELETE FROM $wpdb->termmeta WHERE meta_key = '_translations'");
 
 
 
 
52
  }
53
 
 
54
  // need to register the taxonomies
55
  $pll_taxonomies = array('language', 'term_language', 'post_translations', 'term_translations');
56
  foreach ($pll_taxonomies as $taxonomy)