Take a look in the manual on how to create a plugin -
Plugin System And then all you need to do for this is right in the post you quoted. It tells you the hook location and the contents for plugin. Save and make sure you set it to Active. Wait a little bit (depending on what value you have the cache set up) until you can see the plugin working (it won't work right away because of the cache).