Where to place hook script for plugin
-
New to WP, but a fairly experienced PHP coder.
I’m using a plugin which offers a few hooks which allow me to place additional content in the head/content/footer (this is a plugin which generates it’s own complete page structure).
It’s clear to me how the ‘add_action’ hook is used, but what I’m trying to understand is where the best place to add these hook scripts such that they would not be overwritten by a site or plugin update.
I thought about putting it in the theme/functions.php, but then soon realized that this script may not be invoked when this plugin is active (it is a ‘maintenance mode’ plugin). I also want these hooks to persist regardless of what theme is in use.
Does WP core offer any kind of ‘custom-functions.php’ script which if present, is included during site initialization, and would not be overwritten by an update?
Thanks!
The topic ‘Where to place hook script for plugin’ is closed to new replies.