Описание плагина на русском языке
DCO Russian Fixes is a WordPress plugin that is intended for:
- transliteration of permanent links
- transliteration of Russian names of uploading files
- correct date format for Russian language
This plugin will no longer be maintained. Please use cyr2lat.
1.0.8
The plugin does not require any configuration. After installation and activation it will work automatically. The plugin converts only new permanent links and the names of new uploaded files. Permanent links and file names that were created before the plugin was activated will not be converted.
- Transliterate url
- Transliterate file name
- Correct dates
Filter for hardcoding override plugin settings. You won't be able to edit them on the settings page anymore when using this filter.
Filter for override standard transliterate symbol table
Filter for change transliterate results
Filter for override standard correct dates table
Filter for change correct dates results
Filter for override standard correct archive titles table
Filter for change correct archive titles results
function custom_get_options( $current, $options, $default ) {
$array = array(
'transliterate_url' => 1,
'transliterate_file_name' => 1,
'correct_dates' => 1
);
return $array;
}
add_filter( 'dco_rf_get_options', 'custom_get_options', 10, 3 );
/*
* $current - current plugin settings
*
* $options - plugin settings from database
*
* $default - default plugin settings
*/function custom_transliterate_table( $symbol_table ) {
$symbol_table = array(
'А' => 'A', 'Б' => 'B', 'В' => 'V', 'Г' => 'G', 'Д' => 'D',
'Е' => 'E', 'Ё' => 'YO', 'Ж' => 'ZH', 'З' => 'Z', 'И' => 'I',
'Й' => 'Y', 'К' => 'K', 'Л' => 'L', 'М' => 'M', 'Н' => 'N',
'О' => 'O', 'П' => 'P', 'Р' => 'R', 'С' => 'S', 'Т' => 'T',
'У' => 'U', 'Ф' => 'F', 'Х' => 'H', 'Ц' => 'C', 'Ч' => 'CH',
'Ш' => 'SH', 'Щ' => 'SHH', 'Ъ' => "", 'Ы' => 'YI', 'Ь' => "",
'Э' => 'E`', 'Ю' => 'YU', 'Я' => 'YA',
'а' => 'a', 'б' => 'b', 'в' => 'v', 'г' => 'g', 'д' => 'd',
'е' => 'e', 'ё' => 'yo', 'ж' => 'zh', 'з' => 'z', 'и' => 'i',
'й' => 'y', 'к' => 'k', 'л' => 'l', 'м' => 'm', 'н' => 'n',
'о' => 'o', 'п' => 'p', 'р' => 'r', 'с' => 's', 'т' => 't',
'у' => 'u', 'ф' => 'f', 'х' => 'h', 'ц' => 'c', 'ч' => 'ch',
'ш' => 'sh', 'щ' => 'shh', 'ь' => "", 'ы' => 'yi', 'ъ' => "",
'э' => 'e`', 'ю' => 'yu', 'я' => 'ya'
);
return $symbol_table;
}
add_filter( 'dco_rf_symbol_table', 'custom_transliterate_table' );
/*
* $symbol_table - default transliterate table
*/- Fixed Text Domain
- Transliteration post url enabled for frontend of site
- Corrected localization
- Updated admin settings page heading to WordPress 4.3 styles
- Fixed bug with "э" transliteration for upload files
- Restricted direct access to plugin files
- Fixed bug with russian urls
- Added support transliteration for frontend
- Added additional links for the WP plugin configuration page
- Optimized
- Updated readme
- Fixed bug with filter for override plugin settings
- Corrected settings page
- Rework architecture
- Add settings
- Add additional hooks
- Add filter "dco_symbol_table" for overriding the standard transliteration table
- Initial Release