Current version: 1.0.0
This plugin strips emoji and related pictographic symbols from sanitized slugs so post URLs stay ASCII-only. Post titles are not altered.
- PHP 7.4+
- WordPress 1.2+
As with other small quality-of-life plugins, we recommend using it as a must-use plugin. If you ship it as a folder, you can load it with a MU loader such as wp-mu-loader.
- Download and copy the plugin folder into your must-use plugins directory.
- Nothing more, this plugin is ready to use !
- Removes Unicode Extended_Pictographic characters (emoji).
- Strips regional indicator symbols used in flag sequences.
- Removes common dingbat / misc symbol ranges often used as icons.
- Cleans emoji component characters (variation selectors, ZWJ, combining enclosing keycap).
- Trims redundant hyphen / underscore runs at the edges of the slug fragment.
Issues and pull requests are welcome. For bug reports or feature proposals, use Issues & features request / proposal.
Before you open a pull request:
- Run the unit tests (see Testing below).
- Run coding standards with
composer run cs(PHP_CodeSniffer and the project ruleset inphpcs.xml).
Please keep changes focused and consistent with the existing code style.
The tests are based on PHPUnit and run inside wp-env.
Only unit tests are available.
- Install Docker and Node.js (>= 18)
- Install dependencies:
npm install && composer install - Run tests:
npm run test:unit
To test the code, just launch :
- For unit tests:
npm run test:unit - For a readable report:
npm run test:unit:report - For one-shot start + test + stop:
npm run test:unit:once
- Initialize once on your machine:
npm installcomposer install
- Run test suite:
npm run test:unit
- Read result directly in terminal output:
- Success: exit code
0and PHPUnit success line. - Failure: exit code
1or2with failing test names and stack traces.
- Success: exit code
- Stop environment if needed:
npm run wp-env:stop
- Error
service "cli" is not running:npm run wp-env:startnpm run test:unit
- If environment is corrupted:
npm run wp-env:cleannpm run wp-env:startnpm run test:unit
Please refer to CHANGELOG.md.
If you identify any errors or have an idea for improving the plugin, feel free to open an issue. Please provide as much info as needed in order to help us resolving / approve your request.
Created by Be API, the French WordPress leader agency since 2009. Based in Paris, we are more than 30 people and always hiring some fun and talented guys. So we will be pleased to work with you.
This plugin is only maintained by the Be API team, which means we do not guarantee some free support. Consider reporting an issue and be patient.
If you really like what we do or want to thank us for our quick work, feel free to donate as much as you want / can, even 1€ is a great gift for buying coffee :)
Remove emojis from slugs is licensed under the GPL-3.0-or-later.