Define the Plugin Directory correctly
-
I found an error in the use of detecting the plugin directory and I thought this might be of use to those who have done the same as me.
I have customised how my WordPress files are located from the usual ‘wp-content’ directory and I have also moved my plugins folder out of that by defining WP_PLUGIN_DIR in my wp-config.php file.
When setting up the plugin I was given an error that told me that certain files could not be read due to the location of where it was trying to load the files from.
So after a little reading into the code of this plugin I found that one line needed to be changed.
Before:
define('WP_EMAIL_TEMPLATE_DIR', WP_CONTENT_DIR . '/plugins/' . WP_EMAIL_TEMPLATE_FOLDER);After:
define('WP_EMAIL_TEMPLATE_DIR', WP_PLUGIN_DIR . '/' . WP_EMAIL_TEMPLATE_FOLDER);After that, the plugin no longer displayed the error and the site was operational again.
Hope this helps anyone else who have had a similar issue.
The topic ‘Define the Plugin Directory correctly’ is closed to new replies.