Polylang - Version 1.4.1

Version Description

Polylang 1.2 introduced major internal changes. More than ever, make a database backup before upgrading from 1.1.6 or older! If you are using a version older than 0.8, please ugrade to 0.9.8 before ugrading to 1.4.1

=

Download this release

Release Info

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

Code changes from version 1.4 to 1.4.1

admin/admin-filters-media.php CHANGED
@@ -149,10 +149,11 @@ class PLL_Admin_Filters_Media {
149
  */
150
  public function save_media($post, $attachment) {
151
  $this->model->set_post_language($post['ID'], $attachment['language']); // the language is no more automatically saved by WP since WP 3.5
152
- $this->model->delete_translation('post', $post['ID']);
153
 
154
  // save translations after checking the translated media is in the right language
155
  if (isset($_POST['media_tr_lang'])) {
 
 
156
  foreach ($_POST['media_tr_lang'] as $lang=>$tr_id) {
157
  $translations[$lang] = $this->model->get_post_language((int) $tr_id)->slug == $lang && $tr_id != $post['ID'] ? (int) $tr_id : 0;
158
  }
149
  */
150
  public function save_media($post, $attachment) {
151
  $this->model->set_post_language($post['ID'], $attachment['language']); // the language is no more automatically saved by WP since WP 3.5
 
152
 
153
  // save translations after checking the translated media is in the right language
154
  if (isset($_POST['media_tr_lang'])) {
155
+ $this->model->delete_translation('post', $post['ID']);
156
+
157
  foreach ($_POST['media_tr_lang'] as $lang=>$tr_id) {
158
  $translations[$lang] = $this->model->get_post_language((int) $tr_id)->slug == $lang && $tr_id != $post['ID'] ? (int) $tr_id : 0;
159
  }
admin/admin.php CHANGED
@@ -87,16 +87,18 @@ class PLL_Admin extends PLL_Base {
87
  // 0 => the pages on which to load the script
88
  // 1 => the scripts it needs to work
89
  // 2 => 1 if loaded even if languages have not been defined yet, 0 otherwise
 
 
90
  $scripts = array(
91
- 'admin' => array( array('settings_page_mlang'), array('jquery', 'wp-ajax-response', 'postbox'), 1 ),
92
- 'post' => array( array('post', 'media', 'async-upload', 'edit'), array('jquery', 'wp-ajax-response', 'inline-edit-post'), 0 ),
93
- 'term' => array( array('edit-tags'), array('jquery', 'wp-ajax-response'), 0 ),
94
- 'user' => array( array('profile', 'user-edit'), array('jquery'), 0 ),
95
  );
96
 
97
  foreach ($scripts as $script => $v)
98
  if (in_array($screen->base, $v[0]) && ($v[2] || $this->model->get_languages_list()))
99
- wp_enqueue_script('pll_'.$script, POLYLANG_URL .'/js/'.$script.$suffix.'.js', $v[1], POLYLANG_VERSION);
100
 
101
  wp_enqueue_style('polylang_admin', POLYLANG_URL .'/css/admin'.$suffix.'.css', array(), POLYLANG_VERSION);
102
 
87
  // 0 => the pages on which to load the script
88
  // 1 => the scripts it needs to work
89
  // 2 => 1 if loaded even if languages have not been defined yet, 0 otherwise
90
+ // 3 => 1 if loaded in footer
91
+ // FIXME: check if I can load more scripts in footer
92
  $scripts = array(
93
+ 'admin' => array( array('settings_page_mlang'), array('jquery', 'wp-ajax-response', 'postbox'), 1 , 0),
94
+ 'post' => array( array('post', 'media', 'async-upload', 'edit'), array('jquery', 'wp-ajax-response', 'inline-edit-post'), 0 , 0),
95
+ 'term' => array( array('edit-tags'), array('jquery', 'wp-ajax-response'), 0, 1),
96
+ 'user' => array( array('profile', 'user-edit'), array('jquery'), 0 , 0),
97
  );
98
 
99
  foreach ($scripts as $script => $v)
100
  if (in_array($screen->base, $v[0]) && ($v[2] || $this->model->get_languages_list()))
101
+ wp_enqueue_script('pll_'.$script, POLYLANG_URL .'/js/'.$script.$suffix.'.js', $v[1], POLYLANG_VERSION, $v[3]);
102
 
103
  wp_enqueue_style('polylang_admin', POLYLANG_URL .'/css/admin'.$suffix.'.css', array(), POLYLANG_VERSION);
104
 
admin/settings.php CHANGED
@@ -247,6 +247,9 @@ class PLL_Settings {
247
  foreach (array('browser', 'hide_default', 'redirect_lang', 'media_support') as $key)
248
  $this->options[$key] = isset($_POST[$key]) ? 1 : 0;
249
 
 
 
 
250
  foreach (array('sync', 'post_types', 'taxonomies') as $key)
251
  $this->options[$key] = empty($_POST[$key]) ? array() : array_keys($_POST[$key], 1);
252
 
247
  foreach (array('browser', 'hide_default', 'redirect_lang', 'media_support') as $key)
248
  $this->options[$key] = isset($_POST[$key]) ? 1 : 0;
249
 
250
+ if (3 == $this->options['force_lang'])
251
+ $this->options['browser'] = $this->options['hide_default'] = 0;
252
+
253
  foreach (array('sync', 'post_types', 'taxonomies') as $key)
254
  $this->options[$key] = empty($_POST[$key]) ? array() : array_keys($_POST[$key], 1);
255
 
admin/view-languages.php CHANGED
@@ -184,20 +184,6 @@ case 'settings': ?><?php
184
  </tr><?php
185
  }?>
186
 
187
-
188
- <tr>
189
- <th><?php _e('Detect browser language', 'polylang');?></th>
190
- <td>
191
- <label><?php
192
- printf(
193
- '<input name="browser" type="checkbox" value="1" %s /> %s',
194
- $this->options['browser'] ? 'checked="checked"' :'',
195
- __('When the front page is visited, set the language according to the browser preference', 'polylang')
196
- );?>
197
- </label>
198
- </td>
199
- </tr>
200
-
201
  <tr>
202
  <th rowspan = <?php echo ($page_on_front ? 3 : 2) + $using_permalinks; ?>><?php _e('URL modifications', 'polylang') ?></th>
203
  <td><fieldset id='pll-force-lang'>
@@ -309,7 +295,20 @@ case 'settings': ?><?php
309
  </p>
310
  </fieldset></td>
311
  </tr><?php
312
- }?>
 
 
 
 
 
 
 
 
 
 
 
 
 
313
 
314
  <tr>
315
  <th scope="row"><?php _e('Media', 'polylang') ?></th>
184
  </tr><?php
185
  }?>
186
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
187
  <tr>
188
  <th rowspan = <?php echo ($page_on_front ? 3 : 2) + $using_permalinks; ?>><?php _e('URL modifications', 'polylang') ?></th>
189
  <td><fieldset id='pll-force-lang'>
295
  </p>
296
  </fieldset></td>
297
  </tr><?php
298
+ } ?>
299
+
300
+ <tr id="pll-detect-browser" <?php echo 3 > $this->options['force_lang'] ? '' : 'style="display: none;"'; ?>>
301
+ <th><?php _e('Detect browser language', 'polylang');?></th>
302
+ <td>
303
+ <label><?php
304
+ printf(
305
+ '<input name="browser" type="checkbox" value="1" %s /> %s',
306
+ $this->options['browser'] ? 'checked="checked"' :'',
307
+ __('When the front page is visited, set the language according to the browser preference', 'polylang')
308
+ );?>
309
+ </label>
310
+ </td>
311
+ </tr>
312
 
313
  <tr>
314
  <th scope="row"><?php _e('Media', 'polylang') ?></th>
frontend/choose-lang-url.php CHANGED
@@ -88,8 +88,11 @@ class PLL_Choose_Lang_Url extends PLL_Choose_lang {
88
 
89
  $requested_url = (is_ssl() ? 'https://' : 'http://') . $_SERVER['HTTP_HOST'] . str_replace($languages, '', $_SERVER['REQUEST_URI']);
90
  $redirect_url = $this->links_model->add_language_to_link($requested_url, $language);
91
- wp_redirect($redirect_url, 301);
92
- exit;
 
 
 
93
  }
94
  }
95
  }
88
 
89
  $requested_url = (is_ssl() ? 'https://' : 'http://') . $_SERVER['HTTP_HOST'] . str_replace($languages, '', $_SERVER['REQUEST_URI']);
90
  $redirect_url = $this->links_model->add_language_to_link($requested_url, $language);
91
+
92
+ if ($requested_url != $redirect_url) {
93
+ wp_redirect($redirect_url, 301);
94
+ exit;
95
+ }
96
  }
97
  }
98
  }
frontend/frontend-links.php CHANGED
@@ -43,6 +43,9 @@ class PLL_Frontend_Links extends PLL_Links {
43
  foreach (array('feed_link', 'author_link', 'post_type_archive_link', 'year_link', 'month_link', 'day_link') as $filter)
44
  add_filter($filter, array(&$this, 'archive_link'), 20);
45
 
 
 
 
46
  // rewrites next and previous post links when not automatically done by WordPress
47
  if ($this->options['force_lang'] > 1)
48
  add_filter('get_pagenum_link', array(&$this, 'archive_link'), 20);
@@ -229,7 +232,8 @@ class PLL_Frontend_Links extends PLL_Links {
229
  $url = get_term_link($term, $term->taxonomy); // self link
230
  elseif ($tr_id = $this->model->get_translation('term', $term->term_id, $language)) {
231
  $tr_term = get_term($tr_id, $term->taxonomy);
232
- if ($tr_term && $tr_term->count)
 
233
  $url = get_term_link($tr_term, $term->taxonomy);
234
  }
235
  }
43
  foreach (array('feed_link', 'author_link', 'post_type_archive_link', 'year_link', 'month_link', 'day_link') as $filter)
44
  add_filter($filter, array(&$this, 'archive_link'), 20);
45
 
46
+ // rewrites post format links
47
+ add_filter('term_link', array(&$this, 'term_link'), 20, 3);
48
+
49
  // rewrites next and previous post links when not automatically done by WordPress
50
  if ($this->options['force_lang'] > 1)
51
  add_filter('get_pagenum_link', array(&$this, 'archive_link'), 20);
232
  $url = get_term_link($term, $term->taxonomy); // self link
233
  elseif ($tr_id = $this->model->get_translation('term', $term->term_id, $language)) {
234
  $tr_term = get_term($tr_id, $term->taxonomy);
235
+ // check if translated term (or children) have posts
236
+ if ($tr_term && ($tr_term->count || (is_taxonomy_hierarchical($term->taxonomy) && array_sum(wp_list_pluck(get_terms($term->taxonomy, array('child_of' => $tr_term->term_id, 'lang' => $language->slug)), 'count')))))
237
  $url = get_term_link($tr_term, $term->taxonomy);
238
  }
239
  }
include/links.php CHANGED
@@ -7,6 +7,7 @@
7
  */
8
  class PLL_Links {
9
  public $links_model, $model, $options;
 
10
 
11
  /*
12
  * constructor
@@ -39,19 +40,17 @@ class PLL_Links {
39
  * @return string modified post link
40
  */
41
  public function post_link($link, $post) {
42
- static $links = array();
43
-
44
- if (isset($links[$link]))
45
- return $links[$link];
46
 
47
  if ('post_type_link' == current_filter() && !$this->model->is_translated_post_type($post->post_type))
48
- return $links[$link] = $link;
49
 
50
  if ('_get_page_link' == current_filter()) // this filter uses the ID instead of the post object
51
  $post = get_post($post);
52
 
53
  // /!\ when post_status in not "publish", WP does not use pretty permalinks
54
- return $links[$link] = $post->post_status != 'publish' ? $link : $this->links_model->add_language_to_link($link, $this->model->get_post_language($post->ID));
55
  }
56
 
57
  /*
@@ -65,12 +64,10 @@ class PLL_Links {
65
  * @return string modified term link
66
  */
67
  public function term_link($link, $term, $tax) {
68
- static $links = array();
69
-
70
- if (isset($links[$link]))
71
- return $links[$link];
72
 
73
- return $links[$link] = $this->model->is_translated_taxonomy($tax) ?
74
  $this->links_model->add_language_to_link($link, $this->model->get_term_language($term->term_id)) : $link;
75
  }
76
 
7
  */
8
  class PLL_Links {
9
  public $links_model, $model, $options;
10
+ public $links;
11
 
12
  /*
13
  * constructor
40
  * @return string modified post link
41
  */
42
  public function post_link($link, $post) {
43
+ if (isset($this->links[$link]))
44
+ return $this->links[$link];
 
 
45
 
46
  if ('post_type_link' == current_filter() && !$this->model->is_translated_post_type($post->post_type))
47
+ return $this->links[$link] = $link;
48
 
49
  if ('_get_page_link' == current_filter()) // this filter uses the ID instead of the post object
50
  $post = get_post($post);
51
 
52
  // /!\ when post_status in not "publish", WP does not use pretty permalinks
53
+ return $this->links[$link] = $post->post_status != 'publish' ? $link : $this->links_model->add_language_to_link($link, $this->model->get_post_language($post->ID));
54
  }
55
 
56
  /*
64
  * @return string modified term link
65
  */
66
  public function term_link($link, $term, $tax) {
67
+ if (isset($this->links[$link]))
68
+ return $this->links[$link];
 
 
69
 
70
+ return $this->links[$link] = $this->model->is_translated_taxonomy($tax) ?
71
  $this->links_model->add_language_to_link($link, $this->model->get_term_language($term->term_id)) : $link;
72
  }
73
 
include/plugins-compat.php CHANGED
@@ -37,6 +37,8 @@ class PLL_Plugins_Compat {
37
 
38
  if (!PLL_ADMIN)
39
  add_filter('option_featured-content', array(&$this, 'twenty_fourteen_option_featured_content'));
 
 
40
  }
41
 
42
  /*
@@ -72,7 +74,6 @@ class PLL_Plugins_Compat {
72
  * useful only when the language is set from content
73
  *
74
  * @since 1.2
75
- *
76
  */
77
  public function wpseo_translate_options() {
78
  if (defined('WPSEO_VERSION') && !PLL_ADMIN && did_action('wp_loaded')) {
@@ -170,4 +171,17 @@ class PLL_Plugins_Compat {
170
 
171
  return $settings;
172
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
173
  }
37
 
38
  if (!PLL_ADMIN)
39
  add_filter('option_featured-content', array(&$this, 'twenty_fourteen_option_featured_content'));
40
+
41
+ add_action('widgets_init', array(&$this, 'twenty_fourteen_widgets_init'), 20);
42
  }
43
 
44
  /*
74
  * useful only when the language is set from content
75
  *
76
  * @since 1.2
 
77
  */
78
  public function wpseo_translate_options() {
79
  if (defined('WPSEO_VERSION') && !PLL_ADMIN && did_action('wp_loaded')) {
171
 
172
  return $settings;
173
  }
174
+
175
+ /*
176
+ * overwrites the Twenty Fourteen Ephemera widget to allow translating strings when setting the language by content
177
+ *
178
+ * @since 1.4.1
179
+ */
180
+ public function twenty_fourteen_widgets_init() {
181
+ // overwrites the Twenty Fourteen Ephemera widget to allow translating strings when setting the language by content
182
+ if (class_exists('Twenty_Fourteen_Ephemera_Widget')) {
183
+ unregister_widget('Twenty_Fourteen_Ephemera_Widget');
184
+ register_widget('PLL_Widget_Twenty_Fourteen_Ephemera');
185
+ }
186
+ }
187
  }
include/upgrade.php CHANGED
@@ -88,7 +88,7 @@ class PLL_Upgrade {
88
  * @since 1.2
89
  */
90
  public function _upgrade() {
91
- foreach (array('0.9', '1.0', '1.1', '1.2', '1.2.1', '1.2.3', '1.3', '1.4') as $version)
92
  if (version_compare($this->options['version'], $version, '<'))
93
  call_user_func(array(&$this, 'upgrade_' . str_replace('.', '_', $version)));
94
 
@@ -375,6 +375,18 @@ class PLL_Upgrade {
375
  delete_transient('pll_languages_list');
376
  }
377
 
 
 
 
 
 
 
 
 
 
 
 
 
378
  /*
379
  * old data were not deleted in 1.2, just in case...
380
  * delete them at first upgrade at least 60 days after upgrade to 1.4
88
  * @since 1.2
89
  */
90
  public function _upgrade() {
91
+ foreach (array('0.9', '1.0', '1.1', '1.2', '1.2.1', '1.2.3', '1.3', '1.4', '1.4.1') as $version)
92
  if (version_compare($this->options['version'], $version, '<'))
93
  call_user_func(array(&$this, 'upgrade_' . str_replace('.', '_', $version)));
94
 
375
  delete_transient('pll_languages_list');
376
  }
377
 
378
+ /*
379
+ * upgrades if the previous version is < 1.4.1
380
+ * disables the browser detection when using multiple domains
381
+ *
382
+ * @since 1.4.1
383
+ */
384
+ protected function upgrade_1_4_1() {
385
+ if (3 == $this->options['force_lang'])
386
+ $this->options['browser'] = $this->options['hide_default'] = 0;
387
+ }
388
+
389
+
390
  /*
391
  * old data were not deleted in 1.2, just in case...
392
  * delete them at first upgrade at least 60 days after upgrade to 1.4
include/widget-twenty-fourteen-ephemera.php ADDED
@@ -0,0 +1,159 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*
4
+ * obliged to rewrite the whole functionnality as strings are stored in private array and cannot be translated when setting the language from content
5
+ * see also: https://core.trac.wordpress.org/ticket/27069 which is intentionally not fixed here
6
+ *
7
+ * @since 1.4.1
8
+ */
9
+ class PLL_Widget_Twenty_Fourteen_Ephemera extends Twenty_Fourteen_Ephemera_Widget {
10
+
11
+ /*
12
+ * displays the widget
13
+ * modified version of the parent function to translate strings just before they are used
14
+ *
15
+ * @since 1.4.1
16
+ *
17
+ * @param array $args An array of standard parameters for widgets in this theme.
18
+ * @param array $instance An array of settings for this widget instance.
19
+ */
20
+ public function widget( $args, $instance ) {
21
+ #to be used instead of private parent array#
22
+ $format_strings = array(
23
+ 'aside' => __( 'Asides', 'twentyfourteen' ),
24
+ 'image' => __( 'Images', 'twentyfourteen' ),
25
+ 'video' => __( 'Videos', 'twentyfourteen' ),
26
+ 'audio' => __( 'Audio', 'twentyfourteen' ),
27
+ 'quote' => __( 'Quotes', 'twentyfourteen' ),
28
+ 'link' => __( 'Links', 'twentyfourteen' ),
29
+ 'gallery' => __( 'Galleries', 'twentyfourteen' ),
30
+ );
31
+
32
+ $format = $instance['format'];
33
+ $number = empty( $instance['number'] ) ? 2 : absint( $instance['number'] );
34
+ $title = apply_filters( 'widget_title', empty( $instance['title'] ) ? $format_strings[ $format ] : $instance['title'], $instance, $this->id_base ); #modified#
35
+
36
+ $ephemera = new WP_Query( array(
37
+ 'order' => 'DESC',
38
+ 'posts_per_page' => $number,
39
+ 'no_found_rows' => true,
40
+ 'post_status' => 'publish',
41
+ 'post__not_in' => get_option( 'sticky_posts' ),
42
+ 'tax_query' => array(
43
+ array(
44
+ 'taxonomy' => 'post_format',
45
+ 'terms' => array( "post-format-$format" ),
46
+ 'field' => 'slug',
47
+ 'operator' => 'IN',
48
+ ),
49
+ ),
50
+ ) );
51
+
52
+ if ( $ephemera->have_posts() ) :
53
+ $tmp_content_width = $GLOBALS['content_width'];
54
+ $GLOBALS['content_width'] = 306;
55
+
56
+ echo $args['before_widget'];
57
+ ?>
58
+ <h1 class="widget-title <?php echo esc_attr( $format ); ?>">
59
+ <a class="entry-format" href="<?php echo esc_url( get_post_format_link( $format ) ); ?>"><?php echo $title; ?></a>
60
+ </h1>
61
+ <ol>
62
+
63
+ <?php while ( $ephemera->have_posts() ) : $ephemera->the_post(); ?>
64
+ <li>
65
+ <article <?php post_class(); ?>>
66
+ <div class="entry-content">
67
+ <?php
68
+ if ( has_post_format( 'gallery' ) ) :
69
+
70
+ if ( post_password_required() ) :
71
+ the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'twentyfourteen' ) );
72
+ else :
73
+ $images = array();
74
+
75
+ $galleries = get_post_galleries( get_the_ID(), false );
76
+ if ( isset( $galleries[0]['ids'] ) )
77
+ $images = explode( ',', $galleries[0]['ids'] );
78
+
79
+ if ( ! $images ) :
80
+ $images = get_posts( array(
81
+ 'fields' => 'ids',
82
+ 'numberposts' => -1,
83
+ 'order' => 'ASC',
84
+ 'orderby' => 'menu_order',
85
+ 'post_mime_type' => 'image',
86
+ 'post_parent' => get_the_ID(),
87
+ 'post_type' => 'attachment',
88
+ ) );
89
+ endif;
90
+
91
+ $total_images = count( $images );
92
+
93
+ if ( has_post_thumbnail() ) :
94
+ $post_thumbnail = get_the_post_thumbnail();
95
+ elseif ( $total_images > 0 ) :
96
+ $image = array_shift( $images );
97
+ $post_thumbnail = wp_get_attachment_image( $image, 'post-thumbnail' );
98
+ endif;
99
+
100
+ if ( ! empty ( $post_thumbnail ) ) :
101
+ ?>
102
+ <a href="<?php the_permalink(); ?>"><?php echo $post_thumbnail; ?></a>
103
+ <?php endif; ?>
104
+ <p class="wp-caption-text">
105
+ <?php
106
+ printf( _n( 'This gallery contains <a href="%1$s" rel="bookmark">%2$s photo</a>.', 'This gallery contains <a href="%1$s" rel="bookmark">%2$s photos</a>.', $total_images, 'twentyfourteen' ),
107
+ esc_url( get_permalink() ),
108
+ number_format_i18n( $total_images )
109
+ );
110
+ ?>
111
+ </p>
112
+ <?php
113
+ endif;
114
+
115
+ else :
116
+ the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'twentyfourteen' ) );
117
+ endif;
118
+ ?>
119
+ </div><!-- .entry-content -->
120
+
121
+ <header class="entry-header">
122
+ <div class="entry-meta">
123
+ <?php
124
+ if ( ! has_post_format( 'link' ) ) :
125
+ the_title( '<h1 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h1>' );
126
+ endif;
127
+
128
+ printf( '<span class="entry-date"><a href="%1$s" rel="bookmark"><time class="entry-date" datetime="%2$s">%3$s</time></a></span> <span class="byline"><span class="author vcard"><a class="url fn n" href="%4$s" rel="author">%5$s</a></span></span>',
129
+ esc_url( get_permalink() ),
130
+ esc_attr( get_the_date( 'c' ) ),
131
+ esc_html( get_the_date() ),
132
+ esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ),
133
+ get_the_author()
134
+ );
135
+
136
+ if ( ! post_password_required() && ( comments_open() || get_comments_number() ) ) :
137
+ ?>
138
+ <span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'twentyfourteen' ), __( '1 Comment', 'twentyfourteen' ), __( '% Comments', 'twentyfourteen' ) ); ?></span>
139
+ <?php endif; ?>
140
+ </div><!-- .entry-meta -->
141
+ </header><!-- .entry-header -->
142
+ </article><!-- #post-## -->
143
+ </li>
144
+ <?php endwhile; ?>
145
+
146
+ </ol>
147
+ <a class="post-format-archive-link" href="<?php echo esc_url( get_post_format_link( $format ) ); ?>"><?php printf( __( 'More %s <span class="meta-nav">&rarr;</span>', 'twentyfourteen' ), $format_strings[ $format ] ); #modified#?></a>
148
+ <?php
149
+
150
+ echo $args['after_widget'];
151
+
152
+ // Reset the post globals as this query will have stomped on it.
153
+ wp_reset_postdata();
154
+
155
+ $GLOBALS['content_width'] = $tmp_content_width;
156
+
157
+ endif; // End check for ephemeral posts.
158
+ }
159
+ }
include/wpml-compat.php CHANGED
@@ -153,12 +153,12 @@ if (!function_exists('icl_link_to_element')) {
153
  *
154
  * @param int $id object id
155
  * @param string $type, post type or taxonomy name of the object, defaults to 'post'
156
- * @param bool $return_original_if_missing true if Polylang should return the original id if the translation is missiing
157
  * @param string $lang optional language code, defaults to current language
158
  * @return int|null the object id of the translation, null if the translation is missing and $return_original_if_missing set to false
159
  */
160
  if (!function_exists('icl_object_id')) {
161
- function icl_object_id($id, $type, $return_original_if_missing, $lang = false) {
162
  global $polylang;
163
  return isset($polylang) && ($lang = $lang ? $lang : pll_current_language()) && ($tr_id = $polylang->model->get_translation($type, $id, $lang)) ? $tr_id :
164
  ($return_original_if_missing ? $id : null);
@@ -620,7 +620,7 @@ class PLL_WPML_Config {
620
  if ($tax['attributes']['translate'] == 1 && !$hide)
621
  $taxonomies[$tax['value']] = $tax['value'];
622
  elseif ($hide)
623
- unset ($types[$tax['value']]); // the author decided what to do with the taxonomy so don't allow the user to change this
624
  }
625
  }
626
 
153
  *
154
  * @param int $id object id
155
  * @param string $type, post type or taxonomy name of the object, defaults to 'post'
156
+ * @param bool $return_original_if_missing optional, true if Polylang should return the original id if the translation is missing, defaults to false
157
  * @param string $lang optional language code, defaults to current language
158
  * @return int|null the object id of the translation, null if the translation is missing and $return_original_if_missing set to false
159
  */
160
  if (!function_exists('icl_object_id')) {
161
+ function icl_object_id($id, $type, $return_original_if_missing = false, $lang = false) {
162
  global $polylang;
163
  return isset($polylang) && ($lang = $lang ? $lang : pll_current_language()) && ($tr_id = $polylang->model->get_translation($type, $id, $lang)) ? $tr_id :
164
  ($return_original_if_missing ? $id : null);
620
  if ($tax['attributes']['translate'] == 1 && !$hide)
621
  $taxonomies[$tax['value']] = $tax['value'];
622
  elseif ($hide)
623
+ unset ($taxonomies[$tax['value']]); // the author decided what to do with the taxonomy so don't allow the user to change this
624
  }
625
  }
626
 
js/admin.js CHANGED
@@ -20,6 +20,7 @@ jQuery(document).ready(function($) {
20
  var value = $(this).attr('value');
21
  pll_toggle($('#pll-domains-table'), 3 == value);
22
  pll_toggle($("#pll-hide-default"), 3 > value);
 
23
  pll_toggle($("#pll-rewrite"), 2 > value);
24
 
25
  pll_toggle($("#pll-url-complements"), 3 > value || $("input[name='redirect_lang']").size());
20
  var value = $(this).attr('value');
21
  pll_toggle($('#pll-domains-table'), 3 == value);
22
  pll_toggle($("#pll-hide-default"), 3 > value);
23
+ pll_toggle($("#pll-detect-browser"), 3 > value);
24
  pll_toggle($("#pll-rewrite"), 2 > value);
25
 
26
  pll_toggle($("#pll-url-complements"), 3 > value || $("input[name='redirect_lang']").size());
js/admin.min.js CHANGED
@@ -1 +1 @@
1
- jQuery(document).ready(function(a){a("#lang_list").change(function(){value=a(this).attr("value").split("-");selected=a("select option:selected").text().split(" - ");a("#lang_slug").val(value[0]);a("#lang_locale").val(value[1]);a('input[name="rtl"]').val([value[2]]);a("#lang_name").val(selected[0])});a("input[name='force_lang']").change(function(){function b(d,e){e?d.show():d.hide()}var c=a(this).attr("value");b(a("#pll-domains-table"),3==c);b(a("#pll-hide-default"),3>c);b(a("#pll-rewrite"),2>c);b(a("#pll-url-complements"),3>c||a("input[name='redirect_lang']").size())})});
1
+ jQuery(document).ready(function(a){a("#lang_list").change(function(){value=a(this).attr("value").split("-");selected=a("select option:selected").text().split(" - ");a("#lang_slug").val(value[0]);a("#lang_locale").val(value[1]);a('input[name="rtl"]').val([value[2]]);a("#lang_name").val(selected[0])});a("input[name='force_lang']").change(function(){function b(d,e){e?d.show():d.hide()}var c=a(this).attr("value");b(a("#pll-domains-table"),3==c);b(a("#pll-hide-default"),3>c);b(a("#pll-detect-browser"),3>c);b(a("#pll-rewrite"),2>c);b(a("#pll-url-complements"),3>c||a("input[name='redirect_lang']").size())})});
languages/polylang-cs_CZ.mo ADDED
Binary file
languages/polylang-cs_CZ.po ADDED
@@ -0,0 +1,656 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ msgid ""
2
+ msgstr ""
3
+ "Project-Id-Version: Polylang v1.4\n"
4
+ "Report-Msgid-Bugs-To: \n"
5
+ "POT-Creation-Date: \n"
6
+ "PO-Revision-Date: 2014-02-01 15:38+0100\n"
7
+ "Last-Translator: Přemysl Karbula\n"
8
+ "Language-Team: Přemysl Karbula <www.premyslkarbula.cz>\n"
9
+ "MIME-Version: 1.0\n"
10
+ "Content-Type: text/plain; charset=UTF-8\n"
11
+ "Content-Transfer-Encoding: 8bit\n"
12
+ "Plural-Forms: nplurals=2; plural=n != 1;\n"
13
+ "X-Poedit-SourceCharset: UTF-8\n"
14
+ "X-Poedit-KeywordsList: __;_e;__ngettext:1,2;_n:1,2;__ngettext_noop:1,2;"
15
+ "_n_noop:1,2;_c,_nc:4c,1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2\n"
16
+ "X-Poedit-Basepath: ../\n"
17
+ "X-Textdomain-Support: yes\n"
18
+ "Language: cs_CZ\n"
19
+ "X-Generator: Poedit 1.6.3\n"
20
+ "X-Poedit-SearchPath-0: .\n"
21
+
22
+ # @ polylang
23
+ #: admin/view-about.php:3
24
+ #, php-format
25
+ msgid ""
26
+ "Polylang is provided with an extensive %sdocumentation%s (in English only). "
27
+ "It includes information on how to set up your multilingual site and use it "
28
+ "on a daily basis, a FAQ, as well as a documentation for programmers to adapt "
29
+ "their plugins and themes."
30
+ msgstr ""
31
+ "Polylang disponuje rozsáhlou %sdokumentací%s (pouze v angličtině), která "
32
+ "obsahuje informace o nastavení vašeho vícejazyčného webu a o tom, jak jej "
33
+ "každodenně používat. Obsahuje i FAQ a dokumentaci pro programátory, kteří by "
34
+ "Polylangu chtěli přizpůsobit své pluginy a šablony."
35
+
36
+ # @ polylang
37
+ #: admin/view-about.php:9
38
+ #, php-format
39
+ msgid ""
40
+ "You will also find useful information in the %ssupport forum%s. However "
41
+ "don't forget to make a search before posting a new topic."
42
+ msgstr ""
43
+ "Užitečné informace najdete také ve %sfórech%s. Nicméně nezapomeňte problém "
44
+ "nejprve zkusit vyhledat, než o něm vytvoříte nové vlákno."
45
+
46
+ # @ polylang
47
+ #: admin/view-about.php:16
48
+ #, php-format
49
+ msgid ""
50
+ "Polylang is free of charge and is released under the same license as "
51
+ "WordPress, the %sGPL%s."
52
+ msgstr ""
53
+ "Polylang je k dispozici zdarma a je vydán pod stejnou %sGPL%s licencí jako "
54
+ "Wordpress."
55
+
56
+ # @ polylang
57
+ #: admin/view-about.php:22
58
+ #, php-format
59
+ msgid "If you wonder how you can help the project, just %sread this%s."
60
+ msgstr ""
61
+ "Pokud by Vás zajímalo, jak můžete pomoci při vývoji projektu, přečtěte si "
62
+ "%stoto%s."
63
+
64
+ # @ polylang
65
+ #: admin/view-about.php:27
66
+ msgid ""
67
+ "Finally if you like this plugin or if it helps your business, donations to "
68
+ "the author are greatly appreciated."
69
+ msgstr ""
70
+ "Nakonec, pokud se Vám tento plugin líbí nebo pokud Vám pomáhá při práci, "
71
+ "jeho autor velmi ocení jakoukoliv finanční podporu."
72
+
73
+ # @ polylang
74
+ #: admin/admin-filters-post.php:81 admin/admin.php:76 admin/settings.php:42
75
+ #: admin/settings.php:57 include/model.php:501
76
+ msgid "Languages"
77
+ msgstr "Polylang &mdash; Jazyky"
78
+
79
+ # @ polylang
80
+ #: include/switcher.php:22
81
+ msgid "Displays language names"
82
+ msgstr "Zobrazí názvy jazyků"
83
+
84
+ # @ polylang
85
+ #: include/switcher.php:23
86
+ msgid "Displays flags"
87
+ msgstr "Zobrazí vlajky"
88
+
89
+ # @ polylang
90
+ #: include/switcher.php:24
91
+ msgid "Forces link to front page"
92
+ msgstr "Vynutí odkaz na úvodní stránku"
93
+
94
+ # @ polylang
95
+ #: include/switcher.php:25
96
+ msgid "Hides the current language"
97
+ msgstr "Skryje aktuální jazyk"
98
+
99
+ # @ polylang
100
+ #: include/switcher.php:29
101
+ msgid "Displays as dropdown"
102
+ msgstr "Zobrazí jako rozbalovací seznam"
103
+
104
+ # @ polylang
105
+ #: admin/admin.php:212
106
+ msgid "Filters content by language"
107
+ msgstr "Filtruje obsah podle jazyka"
108
+
109
+ # @ polylang
110
+ #: admin/admin.php:199
111
+ msgid "Show all languages"
112
+ msgstr "Zobrazit všechny jazyky"
113
+
114
+ # @ polylang
115
+ #: admin/admin-filters-columns.php:126 admin/admin-filters-columns.php:218
116
+ msgid "Add new translation"
117
+ msgstr "Přidat nový překlad"
118
+
119
+ # @ polylang
120
+ #: admin/admin-filters-columns.php:160 admin/admin-filters-media.php:57
121
+ #: admin/admin-filters-post.php:114 admin/admin-filters-term.php:73
122
+ #: admin/admin-filters-term.php:110 admin/view-translations-media.php:7
123
+ #: admin/view-translations-media.php:45 admin/view-translations-post.php:8
124
+ #: admin/view-translations-term.php:15 include/model.php:502
125
+ msgid "Language"
126
+ msgstr "Jazyk"
127
+
128
+ # @ polylang
129
+ #: admin/admin-filters-media.php:72 admin/admin-filters-media.php:111
130
+ #: admin/table-string.php:111 admin/view-translations-media.php:42
131
+ #: admin/view-translations-term.php:6 admin/view-translations-term.php:11
132
+ msgid "Translations"
133
+ msgstr "Překlady"
134
+
135
+ # @ polylang
136
+ #: admin/admin-filters-term.php:75 admin/admin-filters-term.php:112
137
+ msgid "Sets the language"
138
+ msgstr "Tímto nastavte jazyk."
139
+
140
+ # @ polylang
141
+ #: admin/admin-filters.php:59
142
+ msgid "The widget is displayed for:"
143
+ msgstr "Widget zobrazí pro:"
144
+
145
+ # @ polylang
146
+ #: admin/admin-filters.php:62 include/model.php:503
147
+ msgid "All languages"
148
+ msgstr "Všechny jazyky"
149
+
150
+ # @ polylang
151
+ #: admin/admin-filters.php:123
152
+ msgid "Admin language"
153
+ msgstr "Jazyk admina"
154
+
155
+ # @ polylang
156
+ #: admin/admin-filters.php:126
157
+ msgid "Wordpress default"
158
+ msgstr "Předvolené WordPress"
159
+
160
+ # @ polylang
161
+ #: admin/admin.php:116 admin/settings.php:62
162
+ msgid "Settings"
163
+ msgstr "Nastavení"
164
+
165
+ # @ polylang
166
+ #: admin/admin-filters.php:156
167
+ msgid "Upgrading language files&#8230;"
168
+ msgstr "Aktualizuji soubory s jazyky&#8230;"
169
+
170
+ # @ polylang
171
+ #: admin/settings.php:38
172
+ msgid "About Polylang"
173
+ msgstr "O Polylangu"
174
+
175
+ # @ polylang
176
+ #: admin/settings.php:46
177
+ msgid "Strings translations"
178
+ msgstr "Překlady textů"
179
+
180
+ # @ polylang
181
+ #: admin/settings.php:61
182
+ msgid "Strings translation"
183
+ msgstr "Překlady textů"
184
+
185
+ # @ polylang
186
+ #: admin/settings.php:74
187
+ msgid "Enter a valid WordPress locale"
188
+ msgstr "Zadejte platný WordPress locale"
189
+
190
+ # @ polylang
191
+ #: admin/settings.php:76
192
+ msgid "The language code must be unique"
193
+ msgstr "Kód jazyka musí být unikátní"
194
+
195
+ # @ polylang
196
+ #: admin/settings.php:77
197
+ msgid "The language must have a name"
198
+ msgstr "Jazyk musí mít název"
199
+
200
+ # @ polylang
201
+ #: admin/settings.php:78
202
+ msgid ""
203
+ "The language was created, but the WordPress language file was not "
204
+ "downloaded. Please install it manually."
205
+ msgstr ""
206
+ "Jazyk byl vytvořen, ale WordPress jazykový soubor nebyl stažen. Prosím, "
207
+ "nainstalujte jej manuálně."
208
+
209
+ # @ polylang
210
+ #: admin/settings.php:308
211
+ msgid "Widget title"
212
+ msgstr "Titulek widgetu"
213
+
214
+ # @ polylang
215
+ #: admin/settings.php:326
216
+ msgid "Taxonomies"
217
+ msgstr "Taxonomie"
218
+
219
+ # @ polylang
220
+ #: admin/settings.php:327
221
+ msgid "Custom fields"
222
+ msgstr "Uživatelská pole"
223
+
224
+ # @ polylang
225
+ #: admin/settings.php:328
226
+ msgid "Comment status"
227
+ msgstr "Stav komentáře"
228
+
229
+ # @ polylang
230
+ #: admin/settings.php:329
231
+ msgid "Ping status"
232
+ msgstr "Stav pingbacku"
233
+
234
+ # @ polylang
235
+ #: admin/settings.php:330
236
+ msgid "Sticky posts"
237
+ msgstr "Zvýrazněné příspěvky"
238
+
239
+ # @ polylang
240
+ #: admin/settings.php:331
241
+ msgid "Published date"
242
+ msgstr "Datum publikování"
243
+
244
+ # @ polylang
245
+ #: admin/settings.php:332
246
+ msgid "Post format"
247
+ msgstr "Formát příspěvku"
248
+
249
+ # @ polylang
250
+ #: admin/settings.php:333
251
+ msgid "Page parent"
252
+ msgstr "Nadřazená stránka"
253
+
254
+ # @ polylang
255
+ #: admin/settings.php:334
256
+ msgid "Page template"
257
+ msgstr "Šablona stránky"
258
+
259
+ # @ polylang
260
+ #: admin/settings.php:335
261
+ msgid "Page order"
262
+ msgstr "Pořadí stránek"
263
+
264
+ # @ polylang
265
+ #: admin/settings.php:336
266
+ msgid "Featured image"
267
+ msgstr "Náhledový obrázek"
268
+
269
+ # @ polylang
270
+ #: admin/view-languages.php:42
271
+ msgid "Edit language"
272
+ msgstr "Upravit jazyk"
273
+
274
+ # @ polylang
275
+ #: admin/view-languages.php:42 admin/view-languages.php:117
276
+ msgid "Add new language"
277
+ msgstr "Přidejte nový jazyk"
278
+
279
+ # @ polylang
280
+ #: admin/view-languages.php:58
281
+ msgid "Choose a language"
282
+ msgstr "Zvolte jazyk"
283
+
284
+ # @ polylang
285
+ #: admin/view-languages.php:72
286
+ msgid "You can choose a language in the list or directly edit it below."
287
+ msgstr "Jazyk můžete vybrat ze seznamu nebo jej zde dole přímo zadat."
288
+
289
+ # @ polylang
290
+ #: admin/table-languages.php:74 admin/view-languages.php:76
291
+ msgid "Full name"
292
+ msgstr "Celý název"
293
+
294
+ # @ polylang
295
+ #: admin/view-languages.php:78
296
+ msgid "The name is how it is displayed on your site (for example: English)."
297
+ msgstr ""
298
+ "Název jazyka, jak bude zobrazen na vašem webu (např. Čeština, English)."
299
+
300
+ # @ polylang
301
+ #: admin/table-languages.php:75 admin/view-languages.php:82
302
+ msgid "Locale"
303
+ msgstr "Locale"
304
+
305
+ # @ polylang
306
+ #: admin/view-languages.php:87
307
+ msgid ""
308
+ "Wordpress Locale for the language (for example: en_US). You will need to "
309
+ "install the .mo file for this language."
310
+ msgstr ""
311
+ "WordPress locale tohoto jazyka (např. cs_CZ, en_US). Pro tento jazyk bude "
312
+ "potřeba nainstalovat .mo soubor."
313
+
314
+ # @ polylang
315
+ #: admin/view-languages.php:91
316
+ msgid "Language code"
317
+ msgstr "Kód jazyka"
318
+
319
+ # @ polylang
320
+ #: admin/view-languages.php:93
321
+ msgid "2-letters ISO 639-1 language code (for example: en)"
322
+ msgstr "Dvoupísmenný kód jazyka dle ISO 639-1 (např. cs, en)."
323
+
324
+ # @ polylang
325
+ #: admin/view-languages.php:97
326
+ msgid "Text direction"
327
+ msgstr "Směr textu"
328
+
329
+ # @ polylang
330
+ #: admin/view-languages.php:101
331
+ msgid "left to right"
332
+ msgstr "zleva doprava"
333
+
334
+ # @ polylang
335
+ #: admin/view-languages.php:106
336
+ msgid "right to left"
337
+ msgstr "zprava doleva"
338
+
339
+ # @ polylang
340
+ #: admin/view-languages.php:108
341
+ msgid "Choose the text direction for the language"
342
+ msgstr "Vyberte směr textu pro daný jazyk."
343
+
344
+ # @ polylang
345
+ #: admin/table-languages.php:77 admin/view-languages.php:112
346
+ msgid "Order"
347
+ msgstr "Pořadí"
348
+
349
+ # @ polylang
350
+ #: admin/view-languages.php:114
351
+ msgid "Position of the language in the language switcher"
352
+ msgstr "Pozice jazyka v přepínači jazyků."
353
+
354
+ # @ polylang
355
+ #: admin/admin-nav-menu.php:52 admin/admin-nav-menu.php:90
356
+ #: admin/admin-nav-menu.php:93 admin/admin-nav-menu.php:124
357
+ #: admin/admin-nav-menu.php:181 include/upgrade.php:298
358
+ msgid "Language switcher"
359
+ msgstr "Přepínač jazyků"
360
+
361
+ # @ polylang
362
+ #: admin/view-languages.php:143
363
+ msgid "Search translations"
364
+ msgstr "Vyhledat překlady"
365
+
366
+ # @ polylang
367
+ #: admin/view-languages.php:146
368
+ msgid "Clean strings translation database"
369
+ msgstr "Vyčistit databázi s překlady textů"
370
+
371
+ # @ polylang
372
+ #: admin/view-languages.php:165
373
+ msgid "Default language"
374
+ msgstr "Výchozí jazyk"
375
+
376
+ # @ polylang
377
+ #: admin/view-languages.php:180
378
+ msgid ""
379
+ "There are posts, pages, categories or tags without language set. Do you want "
380
+ "to set them all to default language ?"
381
+ msgstr ""
382
+ "Některé příspěvky, stránky, kategorie nebo štítky nemají nastavený jazyk. "
383
+ "Chcete jim všem nastavit výchozí jazyk?"
384
+
385
+ # @ polylang
386
+ #: admin/view-languages.php:189
387
+ msgid "Detect browser language"
388
+ msgstr "Detekovat jazyk prohlížeče"
389
+
390
+ # @ polylang
391
+ #: admin/view-languages.php:195
392
+ msgid ""
393
+ "When the front page is visited, set the language according to the browser "
394
+ "preference"
395
+ msgstr "Při návštěvě úvodní stránky nastavit jazyk podle předvoleb prohlížeče"
396
+
397
+ # @ polylang
398
+ #: admin/view-languages.php:202
399
+ msgid "URL modifications"
400
+ msgstr "Modifikování URL"
401
+
402
+ # @ polylang
403
+ #: admin/view-languages.php:259
404
+ msgid "Hide URL language information for default language"
405
+ msgstr "U výchozího jazyka v URL skrýt jeho kód"
406
+
407
+ # @ polylang
408
+ #: admin/view-languages.php:312
409
+ msgid "Media"
410
+ msgstr "Média"
411
+
412
+ # @ polylang
413
+ #: admin/view-languages.php:318
414
+ msgid "Activate languages and translations for media"
415
+ msgstr "Zapnout jazyky a překlady u mediálních souborů"
416
+
417
+ # @ polylang
418
+ #: admin/view-languages.php:365
419
+ msgid "Synchronization"
420
+ msgstr "Synchronizace"
421
+
422
+ # @ polylang
423
+ #: admin/view-languages.php:326
424
+ msgid "Custom post types"
425
+ msgstr "Vlastní typy obsahu"
426
+
427
+ # @ polylang
428
+ #: admin/view-languages.php:339
429
+ msgid "Activate languages and translations for custom post types."
430
+ msgstr "Zapnout jazyky a překlady u vlastních typů obsahu"
431
+
432
+ # @ polylang
433
+ #: admin/view-languages.php:346
434
+ msgid "Custom taxonomies"
435
+ msgstr "Vlastní taxonomie"
436
+
437
+ # @ polylang
438
+ #: admin/view-languages.php:359
439
+ msgid "Activate languages and translations for custom taxonomies."
440
+ msgstr "Zapnout jazyky a překlady u vlastních taxonomií"
441
+
442
+ # @ polylang
443
+ #: admin/table-languages.php:54 admin/view-translations-media.php:24
444
+ #: admin/view-translations-media.php:62 admin/view-translations-post.php:10
445
+ #: admin/view-translations-post.php:39 admin/view-translations-term.php:18
446
+ #: admin/view-translations-term.php:78
447
+ msgid "Edit"
448
+ msgstr "Upravit"
449
+
450
+ # @ polylang
451
+ #: admin/table-languages.php:60 admin/table-string.php:167
452
+ msgid "Delete"
453
+ msgstr "Smazat"
454
+
455
+ # @ polylang
456
+ #: admin/table-languages.php:76
457
+ msgid "Code"
458
+ msgstr "Kód"
459
+
460
+ # @ polylang
461
+ #: admin/table-languages.php:78
462
+ msgid "Flag"
463
+ msgstr "Vlajka"
464
+
465
+ # @ polylang
466
+ #: admin/table-languages.php:79
467
+ msgid "Posts"
468
+ msgstr "Příspěvky"
469
+
470
+ # @ polylang
471
+ #: admin/table-string.php:109
472
+ msgid "Name"
473
+ msgstr "Název"
474
+
475
+ # @ polylang
476
+ #: admin/table-string.php:110
477
+ msgid "String"
478
+ msgstr "Řetězec"
479
+
480
+ # @ polylang
481
+ #: admin/view-translations-media.php:8 admin/view-translations-media.php:46
482
+ #: admin/view-translations-term.php:16
483
+ msgid "Translation"
484
+ msgstr "Překlad"
485
+
486
+ # @ polylang
487
+ #: admin/view-translations-media.php:33 admin/view-translations-media.php:70
488
+ #: admin/view-translations-post.php:44 admin/view-translations-term.php:61
489
+ msgid "Add new"
490
+ msgstr "Přidat nový"
491
+
492
+ # @ polylang
493
+ #: admin/view-translations-post.php:5
494
+ msgid "ID of pages in other languages:"
495
+ msgstr "ID stránek v dalších jazycích:"
496
+
497
+ # @ polylang
498
+ #: admin/view-translations-post.php:5
499
+ msgid "ID of posts in other languages:"
500
+ msgstr "ID příspěvků v dalších jazycích:"
501
+
502
+ # @ polylang
503
+ #: admin/view-translations-post.php:9
504
+ msgid "Page ID"
505
+ msgstr "ID stránky"
506
+
507
+ # @ polylang
508
+ #: admin/view-translations-post.php:9
509
+ msgid "Post ID"
510
+ msgstr "ID příspěvku"
511
+
512
+ # @ polylang
513
+ #: admin/view-translations-term.php:48
514
+ msgid "No untranslated term"
515
+ msgstr "Žádná nepřeložená položka"
516
+
517
+ # @ polylang
518
+ #: include/widget-languages.php:16
519
+ msgid "Language Switcher"
520
+ msgstr "Přepínač jazyků"
521
+
522
+ # @ polylang
523
+ #: include/widget-languages.php:16
524
+ msgid "Displays a language switcher"
525
+ msgstr "Zobrazí přepínač jazyků"
526
+
527
+ # @ polylang
528
+ #: include/widget-languages.php:100
529
+ msgid "Title:"
530
+ msgstr "Název:"
531
+
532
+ # @ polylang
533
+ #. translators: plugin header field 'Description'
534
+ #: polylang.php:0
535
+ msgid "Adds multilingual capability to WordPress"
536
+ msgstr "Přidá možnosti vícejazyčnosti do WordPressu"
537
+
538
+ # @ polylang
539
+ #: polylang.php:159
540
+ #, php-format
541
+ msgid "You are using WordPress %s. Polylang requires at least WordPress %s."
542
+ msgstr "Používáte WordPress %s. Polylang vyžaduje alespoň WordPress %s."
543
+
544
+ # @ polylang
545
+ #: include/upgrade.php:76
546
+ msgid ""
547
+ "Polylang has been deactivated because you upgraded from a too old version."
548
+ msgstr ""
549
+ "Polylang byl deaktivován, protože jste upgradovali z příliš staré verze."
550
+
551
+ # @ polylang
552
+ #: include/upgrade.php:78
553
+ #, php-format
554
+ msgid "Please upgrade first to %s before ugrading to %s."
555
+ msgstr "Prosím upgradujte nejdříve na %s předtím, než budete upgradovat na %s."
556
+
557
+ # @ polylang
558
+ #: admin/table-string.php:108
559
+ msgid "Group"
560
+ msgstr "Skupina"
561
+
562
+ # @ polylang
563
+ #: admin/table-string.php:186
564
+ msgid "View all groups"
565
+ msgstr "Zobrazit všechny skupiny"
566
+
567
+ # @ polylang
568
+ #: admin/table-languages.php:59
569
+ msgid "You are about to permanently delete this language. Are you sure?"
570
+ msgstr "Tímto zcela a navždy vymažete daný jazyk. Jste si jistý?"
571
+
572
+ # @ polylang
573
+ #: admin/view-languages.php:147
574
+ msgid ""
575
+ "Use this to remove unused strings from database, for example after a plugin "
576
+ "has been uninstalled."
577
+ msgstr ""
578
+ "Toto použijte, chcete-li z databáze odstranit nepoužité řetězce a překlady. "
579
+ "Například potom, co byl odinstalován nějaký plugin."
580
+
581
+ # @ polylang
582
+ #: admin/view-languages.php:314
583
+ msgid ""
584
+ "The synchronization options allow to maintain exact same values (or "
585
+ "translations in the case of taxonomies and page parent) of meta content "
586
+ "between the translations of a post or page."
587
+ msgstr ""
588
+ "Sychronizační nastavení umožňuje udržovat stejné hodnoty (nebo překlady v "
589
+ "případě taxonomií a nadřazených stránek) meta obsahu mezi různými překlady "
590
+ "příspěvků či stránek."
591
+
592
+ # @ polylang
593
+ #: admin/settings.php:75
594
+ msgid "The language code contains invalid characters"
595
+ msgstr "Kód jazyka obsahuje nepovolené znaky"
596
+
597
+ # @ polylang
598
+ #: admin/view-languages.php:208
599
+ msgid "The language is set from content"
600
+ msgstr "Jazyk nastavit podle obsahu"
601
+
602
+ # @ polylang
603
+ #: admin/view-languages.php:211
604
+ msgid "Posts, pages, categories and tags urls are not modified."
605
+ msgstr "URL příspěvků, stránek, rubrik a štítků nebudou pozměněny."
606
+
607
+ # @ polylang
608
+ #: admin/view-languages.php:217
609
+ msgid "The language is set from the directory name in pretty permalinks"
610
+ msgstr "Jazyk bude nastaven podle adresáře v pěkných URL"
611
+
612
+ # @ polylang
613
+ #: admin/view-languages.php:220 admin/view-languages.php:229
614
+ #: admin/view-languages.php:276 admin/view-languages.php:285
615
+ msgid "Example:"
616
+ msgstr "Příklad:"
617
+
618
+ # @ polylang
619
+ #: admin/view-languages.php:226
620
+ msgid "The language is set from the subdomain name in pretty permalinks"
621
+ msgstr "Jazyk je nastaven podle subdomény v pěkných URL"
622
+
623
+ # @ polylang
624
+ #: admin/view-languages.php:235
625
+ msgid "The language is set from different domains"
626
+ msgstr "Jazyk bude nastaven podle odlišných domén"
627
+
628
+ # @ polylang
629
+ #: admin/view-languages.php:273
630
+ msgid "Remove /language/ in pretty permalinks"
631
+ msgstr "Odstranit /language/ v pěkných URL"
632
+
633
+ # @ polylang
634
+ #: admin/view-languages.php:282
635
+ msgid "Keep /language/ in pretty permalinks"
636
+ msgstr "Ponechat /language/ v pěkných URL"
637
+
638
+ # @ polylang
639
+ #: admin/view-languages.php:297
640
+ msgid ""
641
+ "The front page url contains the language code instead of the page name or "
642
+ "page id"
643
+ msgstr ""
644
+ "Úvodní stránka bude mít v URL jen kód jazyka a ne název stránky či její ID"
645
+
646
+ # @ polylang
647
+ #: admin/admin-filters-term.php:141
648
+ #, php-format
649
+ msgid "A translation does already exist for %s"
650
+ msgstr "Překlad pro %s již existuje"
651
+
652
+ # @ polylang
653
+ #: admin/view-languages.php:302
654
+ #, php-format
655
+ msgid "Example: %s instead of %s"
656
+ msgstr "Příklad: %s namísto %s"
polylang.php CHANGED
@@ -2,7 +2,7 @@
2
  /*
3
  Plugin Name: Polylang
4
  Plugin URI: http://polylang.wordpress.com/
5
- Version: 1.4
6
  Author: Frédéric Demarle
7
  Description: Adds multilingual capability to WordPress
8
  Text Domain: polylang
@@ -29,7 +29,7 @@ Domain Path: /languages
29
  *
30
  */
31
 
32
- define('POLYLANG_VERSION', '1.4');
33
  define('PLL_MIN_WP_VERSION', '3.5');
34
 
35
  define('POLYLANG_BASENAME', plugin_basename(__FILE__)); // plugin name as known by WP
@@ -201,7 +201,9 @@ class Polylang {
201
 
202
  // always provide a global $polylang object and add our rewrite rules if needed
203
  $polylang = new StdClass();
204
- $polylang->links_model = $this->get_links_model(new PLL_Admin_Model($options), $options);
 
 
205
  flush_rewrite_rules();
206
  }
207
 
2
  /*
3
  Plugin Name: Polylang
4
  Plugin URI: http://polylang.wordpress.com/
5
+ Version: 1.4.1
6
  Author: Frédéric Demarle
7
  Description: Adds multilingual capability to WordPress
8
  Text Domain: polylang
29
  *
30
  */
31
 
32
+ define('POLYLANG_VERSION', '1.4.1');
33
  define('PLL_MIN_WP_VERSION', '3.5');
34
 
35
  define('POLYLANG_BASENAME', plugin_basename(__FILE__)); // plugin name as known by WP
201
 
202
  // always provide a global $polylang object and add our rewrite rules if needed
203
  $polylang = new StdClass();
204
+ $polylang->options = &$options;
205
+ $polylang->model = new PLL_Admin_Model($options);
206
+ $polylang->links_model = $this->get_links_model($polylang->model, $options);
207
  flush_rewrite_rules();
208
  }
209
 
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.5
6
  Tested up to: 3.8
7
- Stable tag: 1.4
8
  License: GPLv2 or later
9
 
10
  Polylang adds multilingual content management support to WordPress.
@@ -24,7 +24,7 @@ Polylang allows you to create a bilingual or multilingual WordPress site. You wr
24
 
25
  = Translators =
26
 
27
- The plugin admin interface is currently available in 31 languages: English, French, German by [Christian Ries](http://www.singbyfoot.lu), Russian by [yoyurec](http://yoyurec.in.ua) and unostar, Greek by [theodotos](http://www.ubuntucy.org), Dutch by [AlbertGn](http://wordpress.org/support/profile/albertgn), Hebrew by [ArielK](http://www.arielk.net), Polish by [Peter Paciorkiewicz](http://www.paciorkiewicz.pl) and [Bartosz](http://www.dfactory.eu/), Latvian by [@AndyDeGroo](http://twitter.com/AndyDeGroo), Italian by [Luca Barbetti](http://wordpress.org/support/profile/lucabarbetti), Danish by [Compute](http://wordpress.org/support/profile/compute), Spanish by Curro, Portuguese by [Vitor Carvalho](http://vcarvalho.com/), Lithuanian by [Naglis Jonaitis](http://najo.lt/), Turkish by [darchws](http://darch.ws/), Finnish by [Jani Alha](http://www.wysiwyg.fi), Bulgarian by [pavelsof](http://wordpress.org/support/profile/pavelsof), Belarusian by [Alexander Markevitch](http://fourfeathers.by/), Afrikaans by [Kobus Joubert](http://translate3d.com/), Hungarian by Csaba Erdei, Norwegian by [Tom Boersma](http://www.oransje.com/), Slovak by [Branco (WebHostingGeeks.com)](http://webhostinggeeks.com/user-reviews/), Swedish by [matsii](http://wordpress.org/support/profile/matsii) and [Jon Täng](http://jontang.se), Catalan by [Núria Martínez Berenguer](http://www.linkedin.com/profile/view?id=127867004&trk=nav_responsive_tab_profile&locale=en_US), Ukrainian by [cmd soft](http://www.cmd-soft.com/), Estonian by [Ahto Naris](http://profiles.wordpress.org/ahtonaris/), Venetian by Michele Brunelli, simplified Chinese by [Changmeng Hu](http://www.wpdaxue.com), Indonesian by [ajoull](http://www.ajoull.com/), Arabic by [Anas Sulaiman](http://ahs.pw/), traditional Chinese by [香腸](http://sofree.cc/)
28
 
29
  = Credits =
30
 
@@ -64,11 +64,24 @@ See http://polylang.wordpress.com/documentation/contribute/
64
 
65
  == Upgrade Notice ==
66
 
67
- = 1.4 =
68
- Polylang 1.2 introduced major internal changes. More than ever, make a database backup before upgrading from 1.1.6 or older! If you are using a version older than 0.8, please ugrade to 0.9.8 before ugrading to 1.3
69
 
70
  == Changelog ==
71
 
 
 
 
 
 
 
 
 
 
 
 
 
 
72
  = 1.4 (2014-01-22) =
73
 
74
  * Add Traditionial Chinese translation contributed by [香腸](http://sofree.cc/)
4
  Tags: multilingual, bilingual, translate, translation, language, multilanguage, international, localization
5
  Requires at least: 3.5
6
  Tested up to: 3.8
7
+ Stable tag: 1.4.1
8
  License: GPLv2 or later
9
 
10
  Polylang adds multilingual content management support to WordPress.
24
 
25
  = Translators =
26
 
27
+ The plugin admin interface is currently available in 32 languages: English, French, German by [Christian Ries](http://www.singbyfoot.lu), Russian by [yoyurec](http://yoyurec.in.ua) and unostar, Greek by [theodotos](http://www.ubuntucy.org), Dutch by [AlbertGn](http://wordpress.org/support/profile/albertgn), Hebrew by [ArielK](http://www.arielk.net), Polish by [Peter Paciorkiewicz](http://www.paciorkiewicz.pl) and [Bartosz](http://www.dfactory.eu/), Latvian by [@AndyDeGroo](http://twitter.com/AndyDeGroo), Italian by [Luca Barbetti](http://wordpress.org/support/profile/lucabarbetti), Danish by [Compute](http://wordpress.org/support/profile/compute), Spanish by Curro, Portuguese by [Vitor Carvalho](http://vcarvalho.com/), Lithuanian by [Naglis Jonaitis](http://najo.lt/), Turkish by [darchws](http://darch.ws/), Finnish by [Jani Alha](http://www.wysiwyg.fi), Bulgarian by [pavelsof](http://wordpress.org/support/profile/pavelsof), Belarusian by [Alexander Markevitch](http://fourfeathers.by/), Afrikaans by [Kobus Joubert](http://translate3d.com/), Hungarian by Csaba Erdei, Norwegian by [Tom Boersma](http://www.oransje.com/), Slovak by [Branco (WebHostingGeeks.com)](http://webhostinggeeks.com/user-reviews/), Swedish by [matsii](http://wordpress.org/support/profile/matsii) and [Jon Täng](http://jontang.se), Catalan by [Núria Martínez Berenguer](http://www.linkedin.com/profile/view?id=127867004&trk=nav_responsive_tab_profile&locale=en_US), Ukrainian by [cmd soft](http://www.cmd-soft.com/), Estonian by [Ahto Naris](http://profiles.wordpress.org/ahtonaris/), Venetian by Michele Brunelli, simplified Chinese by [Changmeng Hu](http://www.wpdaxue.com), Indonesian by [ajoull](http://www.ajoull.com/), Arabic by [Anas Sulaiman](http://ahs.pw/), Traditional Chinese by [香腸](http://sofree.cc/), Czech by [Přemysl Karbula](http://www.premyslkarbula.cz)
28
 
29
  = Credits =
30
 
64
 
65
  == Upgrade Notice ==
66
 
67
+ = 1.4.1 =
68
+ Polylang 1.2 introduced major internal changes. More than ever, make a database backup before upgrading from 1.1.6 or older! If you are using a version older than 0.8, please ugrade to 0.9.8 before ugrading to 1.4.1
69
 
70
  == Changelog ==
71
 
72
+ = 1.4.1 (2014-02-16) =
73
+
74
+ * Add: Czech translation contributed by [Přemysl Karbula](http://www.premyslkarbula.cz)
75
+ * Fix: the displayed language is not correct in quick edit for categories and post tags
76
+ * Fix: the language switcher does not display the correct link for translated parent categories if only children have posts
77
+ * Fix: 3rd parameter of icl_object_id is not optional
78
+ * Fix: issue when combining multiple domains and browser detection -> the combination is now forbidden
79
+ * Fix: conflict Shiba Media Library: link between media translations is lost when using media quick edit
80
+ * Fix: notice when using taxonomies in wpml-config.xml
81
+ * Fix: incorrect post format link
82
+ * Fix: Twenty Fourteen Ephemera widget strings are not translated
83
+ * Fix: Bad gateway experienced by users hosted by wpengine.com
84
+
85
  = 1.4 (2014-01-22) =
86
 
87
  * Add Traditionial Chinese translation contributed by [香腸](http://sofree.cc/)