wildwolf/wp-cyrtolat

WordPress plugin to transliterate cyrillic slugs into latin

3.0.1 2021-09-06 16:41 UTC

This package is auto-updated.

Last update: 2024-04-16 15:50:16 UTC


README

CI Static Code Analysis Quality Gate Status

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:

  1. wwcyrtolat_xlat_table: allows for customization of the transliteration table.
  2. wwcyrtolat_xlat_re_table: allows for customization of the regular expression based transliteration table.
  3. transliterate_name: this one allows for modification of the transliterated name / slug.

Installation

Run from 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