Title Formatter
A simple-to-use text formatter for page and blog titles
PHP
Composer
Title Formatter is a lightweight PHP package for properly capitalizing page and blog titles following standard English title case rules.
Formatting Rules
- Capitalizes the first and last word of every sentence
- Capitalizes words within brackets and similar punctuation
- Skips small words (articles, prepositions, conjunctions) unless they start or end a sentence
- Handles dashed compound words: "super-awesome-post" becomes "Super-Awesome-Post"
- Respects intentional casing like eBay, iPad, and McCormick
I built this after getting tired of inconsistent title capitalization across blog posts and CMS content. It handles the edge cases that simple ucwords() calls miss.