https://github.com/aginev/wp-sanitize
Transliterate WordPress post slugs and media file names
https://github.com/aginev/wp-sanitize
post slug slugify transliterate wordpress
Last synced: 6 months ago
JSON representation
Transliterate WordPress post slugs and media file names
- Host: GitHub
- URL: https://github.com/aginev/wp-sanitize
- Owner: aginev
- License: mit
- Created: 2018-03-22T08:32:38.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2021-10-27T04:54:05.000Z (over 4 years ago)
- Last Synced: 2023-03-23T07:48:24.150Z (over 3 years ago)
- Topics: post, slug, slugify, transliterate, wordpress
- Language: PHP
- Homepage:
- Size: 3.91 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Transliterate WordPress post slugs and media file names
If you are dealing with content data have non Ascii character like Bulgarian, Russian, German etc. and want to have all
characters transliterated in slugs and file names you can use this package.
## Install
```bash
composer require aginev/wp-sanitize
```
## Usage
### Transliterate post slugs
```php
wp_sanitize_title();
// Имало едно време в Мексико -> imalo-edno-vreme-v-meksiko
```
### Transliterate media library file names
```php
wp_sanitize_filenames();
// Имало едно време в Мексико.jpg -> imalo-edno-vreme-v-meksiko.jpg
```
## License
Everything in this repository is MIT License unless otherwise specified.
MIT © 2018 Atanas Ginev