| 开发者 |
Atrax
SergeyBiryukov karevn webvitaly ivijanstefan creativform |
|---|---|
| 更新时间 | 2026年2月10日 17:53 |
| PHP版本: | 2.3 及以上 |
| WordPress版本: | 6.9 |
| 版权: | GPLv2 or later |
| 版权网址: | 版权信息 |
sanitize_title and sanitize_file_name) and performs transliteration at the moment slugs and filenames are generated.\
It does not modify post content, titles or front-end text. Its scope is strictly limited to URLs and file names.
On activation, existing post and term slugs are converted in the background using safe, batch-based processing via WP-Cron.\
WordPress core APIs are used to preserve permalink integrity and existing redirects.
Transliteration is based on an ISO 9-style mapping table with built-in support for:
cyr3lat folder to the /wp-content/plugins/ directory.iconv is available on your server, it will be used as a best-effort fallback.You can modify or extend the transliteration table by using the ctl_table filter.
Add this code to your theme's functions.php file:
function my_cyr_to_lat_table( $ctl_table ) { $ctl_table['Ъ'] = 'U'; $ctl_table['ъ'] = 'u'; return $ctl_table; } add_filter( 'ctl_table', 'my_cyr_to_lat_table' );
By default, the plugin processes slugs in batches to avoid timeouts.\
On slower or low-memory servers, you may want to reduce the batch size.
Add this code to your theme's functions.php file:
function my_ctl_batch_size( $size, $context ) { // Apply the same batch size for posts and terms. return 100; } add_filter( 'ctl_enhanced_batch_size', 'my_ctl_batch_size', 10, 2 );
Yes. You can adjust the final slug value after transliteration and normalization
by using the ctl_enhanced_sanitized_title filter.
Add this code to your theme's functions.php file:
function my_ctl_modify_slug( $slug, $source, $context ) { // Example: append a suffix to all generated slugs. return $slug . '-custom'; } add_filter( 'ctl_enhanced_sanitized_title', 'my_ctl_modify_slug', 10, 3 );
Yes. You can adjust media file names after transliteration and normalization
by using the ctl_enhanced_sanitized_file_name filter.
Add this code to your theme's functions.php file:
function my_ctl_modify_filename( $filename, $source ) { // Example: prepend a prefix to all media file names. return 'media-' . $filename; } add_filter( 'ctl_enhanced_sanitized_file_name', 'my_ctl_modify_filename', 10, 2 );
Cyr to Lat Enhanced is a continuation of the original cyr2lat / cyr3lat lineage. Its purpose is strictly limited to transliteration of post slugs, term slugs and media file names. The original cyr2lat plugin by Sergey Biryukov introduced a simple and effective way to generate Latin slugs from Cyrillic titles. Cyr to Lat Enhanced preserves this philosophy while modernizing the codebase, improving reliability and ensuring compatibility with current WordPress versions. Transliterator is a separate plugin with a different scope and goals. It is designed for advanced and complex use cases, including: