WP Translitera - Version 150712

Version Description

After update deactivate and activate plugin

Download this release

Release Info

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

Version 150712

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: spam, mail, protection
5
+ Requires at least: 1.2
6
+ Tested up to: 4.2.2
7
+ Stable tag: 4.3
8
+ License: GPLv2 or later
9
+ License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
+
11
+ Transliteration plugin
12
+
13
+ == Description ==
14
+
15
+ Transliteration plugin
16
+
17
+ == Installation ==
18
+
19
+ Automatical from repository or unzip in plugins and activate in ACP.
20
+
21
+ == Frequently Asked Questions ==
22
+
23
+ == Screenshots ==
24
+
25
+ == Changelog ==
26
+ all info:
27
+ http://azbuki.info/viewforum.php?f=32
28
+
29
+ == Upgrade Notice ==
30
+ After update deactivate and activate plugin
31
+
32
+ == Arbitrary section ==
33
+ --
34
+
35
+ == A brief Markdown Example ==
36
+
37
+ `<?php code(); // goes in backticks ?>`
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: Protection from spam through your blog
6
+ Version: 150712
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);