Syllable Hyphenator #5 in Utilities
Server-side hyphenation for WordPress with Syllable library.
by Johannes Siipola · github.com/joppuyo/syllable-hyphenator · website
★ 12stars
242release downloads
≈10active sites
2forks
Install
The author publishes release zips, so WP-CLI can install straight from GitHub:
wp plugin install https://github.com/joppuyo/syllable-hyphenator/releases/download/v1.1.0/syllable-hyphenator.zipFrom the readme
Syllable Hyphenator
Server-side hyphenation for WordPress with Syllable library. It works by inserting or "soft hyphen" characters to your strings so browsers will hyphenate the words correctly for you.
Compatiblity
- PHP 7 +
- WordPress 5.0 +
- (Optional) Timber 1.10.0 +
- (Optional) Polylang
Installation
1. Download latest version on the Releases page.
2. Upload plugin on the WordPress plugin admin page.
3. Activate plugin.
4. See section below on how to use the plugin in your theme
Usage
You can use the syllablehyphenate WordPress filter to hyphenate text.
If you are using Timber, you can also use the hyphenate Twig filter,
You can use the syllablehyphenatehtml filter to hyphenate a HTML string. For example, let's say you want to hyphenate output of Heading Gutenberg blocks. You can do it with the following code:
Filters
Minimum word length
syllablehyphenatorminwordlength
By default, minimum word length for hyphenation is set to 12 characters. This prevents awkward hyphenation of very short words.
WordPress locale
syllablehyphenatorwplocale
Language used for hyphenation. By default this is the language specified in the WordPress settings page. This can be o
Read the full README on GitHub →
Releases
| Tag | Published | Asset | Downloads |
|---|---|---|---|
| v1.1.0 | May 20, 2023 | syllable-hyphenator.zip | 169 |
| v1.0.3 | Sep 20, 2020 | syllable-hyphenator.zip | 56 |
| v1.0.2 | Sep 20, 2020 | syllable-hyphenator.zip | 5 |
| v1.0.1 | Sep 17, 2020 | syllable-hyphenator.zip | 4 |
| v1.0.0 | Sep 15, 2020 | syllable-hyphenator.zip | 8 |
Active-site estimate ≈10 comes from the median of recent superseded releases. Method.