Created
October 7, 2013 17:35
-
-
Save jesgs/6871789 to your computer and use it in GitHub Desktop.
The author was lazy today...
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| add_filter('the_title', '_correct_empty_title', 10, 2); | |
| /** | |
| * Add snarky filler title for posts without titles | |
| * | |
| * @param string $title WordPress post title | |
| * @param int $id WordPress post ID | |
| * @return string | |
| */ | |
| function _correct_empty_title($title, $id) | |
| { | |
| if ($title === '') { | |
| $title = __('No Title; Author Too Lazy …'); | |
| } | |
| return $title; | |
| } | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment