Fantastic, the hook suggested worked a treat.
Regarding the location of the php code, I prefer to put hook php into file. Doing it this way means that the opcode cachers can work on the file - if the php is in the hook itself then it can't be cached in the same way. For a couple of hooks here and there it makes little difference, but once you have a number of hooks the difference is noticeable.
|