Cyr to Lat enhanced - Version 3.3.3

Version Description

Download this release

Release Info

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

Code changes from version 3.3.2 to 3.3.3

Files changed (2) hide show
  1. cyr-to-lat.php +5 -5
  2. readme.txt +2 -2
cyr-to-lat.php CHANGED
@@ -5,7 +5,7 @@ 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
9
  */
10
 
11
  function ctl_sanitize_title($title) {
@@ -66,9 +66,9 @@ 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
- 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);
@@ -86,7 +86,7 @@ add_filter('sanitize_file_name', 'ctl_sanitize_title');
86
  function ctl_convert_existing_slugs() {
87
  global $wpdb;
88
 
89
- $posts = $wpdb->get_results("SELECT ID, post_name FROM {$wpdb->posts} WHERE post_name REGEXP('[^A-Za-z0-9\-]+') AND post_status = 'publish'");
90
  foreach ( (array) $posts as $post ) {
91
  $sanitized_name = ctl_sanitize_title(urldecode($post->post_name));
92
  if ( $post->post_name != $sanitized_name ) {
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.3
9
  */
10
 
11
  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
+ 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);
86
  function ctl_convert_existing_slugs() {
87
  global $wpdb;
88
 
89
+ $posts = $wpdb->get_results("SELECT ID, post_name FROM {$wpdb->posts} WHERE post_name REGEXP('[^A-Za-z0-9\-]+') AND post_status IN ('publish', 'future', 'private')");
90
  foreach ( (array) $posts as $post ) {
91
  $sanitized_name = ctl_sanitize_title(urldecode($post->post_name));
92
  if ( $post->post_name != $sanitized_name ) {
readme.txt CHANGED
@@ -2,8 +2,8 @@
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
 
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.4.1
6
+ Stable tag: 3.3.3
7
 
8
  Converts Cyrillic, European and Georgian characters in post, page and term slugs to Latin characters.
9