Cyr to Lat enhanced - Version 3.3.2

Version Description

  • Added support for European diacritics
Download this release

Release Info

Developer karevn
Plugin Icon wp plugin Cyr to Lat enhanced
Version 3.3.2
Comparing to
See all releases

Code changes from version 3.3.1 to 3.3.2

Files changed (2) hide show
  1. cyr-to-lat.php +5 -2
  2. readme.txt +8 -4
cyr-to-lat.php CHANGED
@@ -2,7 +2,7 @@
2
  /*
3
  Plugin Name: Cyr to Lat enhanced
4
  Plugin URI: http://wordpress.org/extend/plugins/cyr3lat/
5
- Description: Converts Cyrillic and Georgian characters in post, term slugs and media file names to Latin characters. Useful for creating human-readable URLs. Based on the original plugin by Anton Skorobogatov.
6
  Author: Sol, Sergey Biryukov, Nikolay Karev, Dmitri Gogelia
7
  Author URI: http://karevn.com/
8
  Version: 3.3.1
@@ -66,7 +66,10 @@ function ctl_sanitize_title($title) {
66
 
67
  $term = $is_term ? $wpdb->get_var("SELECT slug FROM {$wpdb->terms} WHERE name = '$title'") : '';
68
  if ( empty($term) ) {
69
- $title = strtr($title, apply_filters('ctl_table', $iso9_table));
 
 
 
70
  $title = preg_replace("/[^A-Za-z0-9'_\-\.]/", '-', $title);
71
  $title = preg_replace('/\-+/', '-', $title);
72
  $title = preg_replace('/^-+/', '', $title);
2
  /*
3
  Plugin Name: Cyr to Lat enhanced
4
  Plugin URI: http://wordpress.org/extend/plugins/cyr3lat/
5
+ Description: Converts Cyrillic, European and Georgian characters in post, term slugs and media file names to Latin characters. Useful for creating human-readable URLs. Based on the original plugin by Anton Skorobogatov.
6
  Author: Sol, Sergey Biryukov, Nikolay Karev, Dmitri Gogelia
7
  Author URI: http://karevn.com/
8
  Version: 3.3.1
66
 
67
  $term = $is_term ? $wpdb->get_var("SELECT slug FROM {$wpdb->terms} WHERE name = '$title'") : '';
68
  if ( empty($term) ) {
69
+ $title = strtr($title, apply_filters('ctl_table', $iso9_table));
70
+ if (function_exists('iconv')){
71
+ $title = iconv('UTF-8', 'UTF-8//TRANSLIT//IGNORE', $title);
72
+ }
73
  $title = preg_replace("/[^A-Za-z0-9'_\-\.]/", '-', $title);
74
  $title = preg_replace('/\-+/', '-', $title);
75
  $title = preg_replace('/^-+/', '', $title);
readme.txt CHANGED
@@ -1,16 +1,17 @@
1
  === Cyr to Lat enhanced ===
2
  Contributors: Atrax, SergeyBiryukov, karevn
3
- Tags: cyrillic, latin, l10n, russian, rustolat, slugs, translations, transliteration, media, georgian
4
  Requires at least: 2.3
5
  Tested up to: 3.2
6
- Stable tag: 3.3.1
7
 
8
- Converts Cyrillic and Georgian characters in post, page and term slugs to Latin characters.
9
 
10
  == Description ==
11
 
12
  Converts Cyrillic and Georgian characters in post, page and term slugs to Latin characters. Useful for creating human-readable URLs.
13
 
 
14
  This plugin is a fork of [cyr2lat](http://wordpress.org/extend/plugins/cyr2lat/) plugin.
15
 
16
  = Features =
@@ -26,7 +27,7 @@ Based on the original Rus-To-Lat plugin by Anton Skorobogatov.
26
 
27
  1. Upload `cyr2lat` folder to the `/wp-content/plugins/` directory.
28
  2. Activate the plugin through the 'Plugins' menu in WordPress.
29
-
30
  == Frequently Asked Questions ==
31
 
32
  = How can I define my own substitutions? =
@@ -43,6 +44,9 @@ add_filter('ctl_table', 'my_cyr_to_lat_table');
43
 
44
  == Changelog ==
45
 
 
 
 
46
  = 3.3.1 =
47
  * Added Georgian transliteration table
48
  * A problem with some letters causing apostrophes in slugs was resolved
1
  === Cyr to Lat enhanced ===
2
  Contributors: Atrax, SergeyBiryukov, karevn
3
+ Tags: cyrillic, latin, l10n, russian, rustolat, slugs, translations, transliteration, media, georgian, european, diacritics
4
  Requires at least: 2.3
5
  Tested up to: 3.2
6
+ Stable tag: 3.3.2
7
 
8
+ Converts Cyrillic, European and Georgian characters in post, page and term slugs to Latin characters.
9
 
10
  == Description ==
11
 
12
  Converts Cyrillic and Georgian characters in post, page and term slugs to Latin characters. Useful for creating human-readable URLs.
13
 
14
+
15
  This plugin is a fork of [cyr2lat](http://wordpress.org/extend/plugins/cyr2lat/) plugin.
16
 
17
  = Features =
27
 
28
  1. Upload `cyr2lat` folder to the `/wp-content/plugins/` directory.
29
  2. Activate the plugin through the 'Plugins' menu in WordPress.
30
+ 3. Make sure your system has iconv set up right, or iconv is not installed at all. If you have any problems (trimmed slugs, strange characters, question marks) - please ask for support.
31
  == Frequently Asked Questions ==
32
 
33
  = How can I define my own substitutions? =
44
 
45
  == Changelog ==
46
 
47
+ = 3.3.2 =
48
+ * Added support for European diacritics
49
+
50
  = 3.3.1 =
51
  * Added Georgian transliteration table
52
  * A problem with some letters causing apostrophes in slugs was resolved