Great piece of code. Very hard to find though. I have added "How To Automatically Shorten/Truncate WordPress Post Titles Using The Functions.php File" to the comments to make it easier to find.