WP Translitera - Version 150808

Version Description

After update deactivate and activate plugin

Download this release

Release Info

Developer YurchenkoEV
Plugin Icon wp plugin WP Translitera
Version 150808
Comparing to
See all releases

Version 150808

Files changed (2) hide show
  1. readme.txt +37 -0
  2. wp-translitera.php +46 -0
readme.txt ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ === Plugin Name ===
2
+ Contributors: YurchenkoEV
3
+ Donate link: http://yur4enko.com/
4
+ Tags: translate, rus-to-lat, Seo, tag, record, page
5
+ Requires at least: 1.2
6
+ Tested up to: 4.4
7
+ Stable tag: 4.4
8
+ License: GPLv2 or later
9
+ License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
+
11
+ Plug-in for transliteration permanent permalink records , pages, and tag ||
12
+ Плагин для транслитерации постоянных постоянных ссылок записей, страниц и тегов
13
+
14
+ == Description ==
15
+
16
+ Plug-in for transliteration permanent permalink records , pages, and tag ||
17
+ Плагин для транслитерации постоянных постоянных ссылок записей, страниц и тегов
18
+
19
+ == Installation ==
20
+
21
+ Automatical from repository or unzip in plugins and activate in ACP.
22
+
23
+ == Frequently Asked Questions ==
24
+
25
+ == Screenshots ==
26
+
27
+ == Changelog ==
28
+ all info:
29
+ http://azbuki.info/viewforum.php?f=32
30
+
31
+ == Upgrade Notice ==
32
+ After update deactivate and activate plugin
33
+
34
+ == Arbitrary section ==
35
+ --
36
+
37
+ == A brief Markdown Example ==
wp-translitera.php ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ Plugin Name: WP Translitera
4
+ Plugin URI: http://azbuki.info/viewforum.php?f=32
5
+ Description: Plug-in for transliteration permanent permalink records , pages, and tag
6
+ Version: 150808
7
+ Author: Evgen Yurchenko
8
+ Author URI: http://yur4enko.com/
9
+ */
10
+
11
+ /* Copyright 2015 Evgen Yurchenko (email: evgen@yur4enko.com)
12
+
13
+ This program is free software; you can redistribute it and/or modify
14
+ it under the terms of the GNU General Public License as published by
15
+ the Free Software Foundation; either version 2 of the License, or
16
+ (at your option) any later version.
17
+
18
+ This program is distributed in the hope that it will be useful,
19
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
20
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21
+ GNU General Public License for more details.
22
+
23
+ You should have received a copy of the GNU General Public License
24
+ along with this program; if not, write to the Free Software
25
+ Foundation, Inc.
26
+ */
27
+
28
+ class wp_translitera {
29
+ public static function transliterate($title) {
30
+ $to = array(
31
+ 'А'=>'A','а'=>'a','Б'=>'B','б'=>'b','В'=>'V','в'=>'v','Г'=>'G',
32
+ 'г'=>'g','Д'=>'D','д'=>'d','Е'=>'E','е'=>'e','Ё'=>'Jo','ё'=>'jo',
33
+ 'Ж'=>'Zh','ж'=>'zh','З'=>'Z','з'=>'z','И'=>'I','и'=>'i','Й'=>'J',
34
+ 'й'=>'j','К'=>'K','к'=>'k','Л'=>'L','л'=>'l','М'=>'M','м'=>'m',
35
+ 'Н'=>'N','н'=>'n','О'=>'O','о'=>'o','П'=>'P','п'=>'p','Р'=>'R',
36
+ 'р'=>'r','С'=>'S','с'=>'s','Т'=>'T','т'=>'t','У'=>'U','у'=>'u',
37
+ 'Ф'=>'F','ф'=>'f','Х'=>'H','х'=>'h','Ц'=>'C','ц'=>'c','Ч'=>'Ch',
38
+ 'ч'=>'ch','Ш'=>'Sh','ш'=>'sh','Щ'=>'Shh','щ'=>'shh','Ъ'=>'',
39
+ 'ъ'=>'','Ы'=>'Y','ы'=>'y','Ь'=>'','ь'=>'','Э'=>'Je','э'=>'je',
40
+ 'Ю'=>'Ju','ю'=>'ju','Я'=>'Ja','я'=>'ja'
41
+ );
42
+ return strtr($title, $to);
43
+ }
44
+ }
45
+
46
+ add_action('sanitize_title', array('wp_translitera','transliterate'), 0);