2013-01-04, 09:45:03
I'm developing a plugin that I want to give the user an option on where it should appear. The user will decide what page it should be on, and if it should be before or after the content. Is there anyway to have a smart hook that only loads on the selected page in the selected spot?
Currently, I'm thinking of having the two hooks for before and after the content and then just use and if statement to check if the user is on the page for the plugin to be loaded on and then if it should be loaded before or after. Does having an hook load on every page with an if statement hurt performance? Is this the best way to do it?
Currently, I'm thinking of having the two hooks for before and after the content and then just use and if statement to check if the user is on the page for the plugin to be loaded on and then if it should be loaded before or after. Does having an hook load on every page with an if statement hurt performance? Is this the best way to do it?