Installed this and it all appears to be working fine on 2.2.5.
jamesdasher is right, the code appears in the file twice. I added the code before the first reference. I warn everyone to make sure when they copy and paste the code to be added to manually remove PHP code from the commented lines, for some reason it is written in them?! Anyway, thanks for this hack - just what I needed!