Created
August 10, 2014 14:24
-
-
Save peterhartree/6228a6fa163eea4ea0fa to your computer and use it in GitHub Desktop.
WordPress: Capitalise term title
This file contains 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
/** | |
* Capitalises the first letter of term title for display. | |
*/ | |
function capitalise_term_titles( $term_obj ) { | |
$term_obj->name = ucfirst($term_obj->name); | |
return $term_obj; | |
} | |
add_filter( 'get_term', 'capitalise_term_titles' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment