In reply to Chaidir.

While I can appreciate your not wanting to use the plugin, (it's not being merged with core, and it's not being automatically downloaded, so no worries), that kind of functionality should not be placed in your theme's functions.php, but in a custom functionality plugin for your site. If you put it in functions.php, when you switch themes, it goes away. If you add the code to a custom functionality plugin, the functionality stays regardless of theme.