I’m writing a plugin which will put some default values into the options table through a function called by the activate_ hook. However, this needs a somewhat hardcoded URL, meaning that the user needs to save the plugin file at a predefined location.
So I was wondering, if the current location of the plugin file can be determined and passed to the hook? This way, the user could put the plugin in a subdirectory or where he wants it.
- The topic ‘Proper use of activate_ hook?’ is closed to new replies.