Repository navigation
Releases
Releases · IndianOpinion/ascii-slugs
ascii-slugs 0.1.0
Added
- Library
IndianOpinion\AsciiSlugswith no dependencies:Slugger,
SlugOptions,SlugResult,Transliterator,ScriptTable,
ArrayScriptTable, clocks and typed exceptions. Usable through Composer
or onerequireofbootstrap.php. - Built-in tables for Devanagari, Bengali-Assamese, Gurmukhi, Gujarati,
Odia, Tamil, Telugu, Kannada, Malayalam, Arabic script with Urdu rules
(plus a 20-word Urdu exception list), Cyrillic, Greek and Latin with
diacritics. Tables load on first use. - Optional ICU transliteration through
intlfor other scripts, with the
modesauto,neverandprefer. - Readability floor and a dated SHA-256 hash fallback.
- Uniqueness helper for use outside WordPress.
- WordPress plugin:
sanitize_titlemain path,wp_unique_post_slug
safety net, apre_term_slugguard that keeps stored term slugs when the
term edit screen sends them back decoded, filters and actions for every
default, kill switch constantASCII_SLUGS_DISABLED. - WP-CLI commands
preview,status,auditandrepair(dry run by
default). - Site Health Info section with
intlavailability and the count of
percent-encoded slugs, skipped above 100,000 published posts
(ascii_slugs_site_health_scan_limit).
Performance: the first-call speed budget of 0.5 ms is not met. The README measures about 1.2 ms for the first slug in a request with OPcache on (0.45 ms of it loading the table), about 0.5 to 0.6 ms once the table is loaded, and about 4 ms with OPcache off (shared 2 vCPU VM, PHP 8.3, median of 50 requests, 200-code-point Devanagari title).
Install: composer require indianopinion/ascii-slugs