wildwolf / wp-cyrtolat
WordPress plugin to transliterate cyrillic slugs into latin
Fund package maintenance!
www.paypal.com/donate/?hosted_button_id=SAG6877JDJ3KU
send.monobank.ua/jar/7rosVfiwKM
Installs: 45
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 3
Forks: 0
Open Issues: 0
Type:wordpress-plugin
Requires
- php: ^7.3 || ^8.0
- composer/installers: ^1.9 || ^2.0
- wildwolf/singleton-trait: ^1.0
Requires (Dev)
- dealerdirect/phpcodesniffer-composer-installer: ^0.7.1
- humanmade/psalm-plugin-wordpress: ^2.0
- johnpbloch/wordpress-core: ^5.8
- phpcompatibility/phpcompatibility-wp: ^2.1
- phpstan/phpstan: ^0.12.83
- phpstan/phpstan-strict-rules: ^0.12.9
- phpunit/phpunit: ^7
- psalm/plugin-phpunit: ^0.16.1
- szepeviktor/phpstan-wordpress: ^0.7.5
- vimeo/psalm: ^4.7
- wildwolf/phpunit7-php8-helper: ^1.0
- wildwolf/wordpress-test-library-stubs: ^5.8
- wp-coding-standards/wpcs: ^2.3
- wp-phpunit/wp-phpunit: ^5.8
- yoast/phpunit-polyfills: ^1.0
README
WordPress plugin to transliterate Cyrillic slugs into Latin.
The plugin was written as a replacement to cyr3lat, which is no longer maintained and is vulnerable to SQL injection.
Unlike other plugins, this one does not use sanitize_title
hook (which fires for many things
other than post/page/term slugs), which reduces the risk of unwanted side effects.
The plugin uses wp_insert_post_data
, wp_insert_attachment_data
, and get_sample_permalink
for posts/pages/attachments, and wp_insert_term_data
/ wp_update_term_data
for terms.
The plugin provides three custom filters:
wwcyrtolat_xlat_table
: allows for customization of the transliteration table.wwcyrtolat_xlat_re_table
: allows for customization of the regular expression-based transliteration table.transliterate_name
: this one allows to modify the transliterated name/slug.
Installation
Run from the WordPress root directory:
composer require wildwolf/wp-cyrtolat
After that, please go to the Admin Dashboard => Plugins and activate the plugin.
Configuration
Admin Dashboard => Options => WW CyrToLat