Problems using WP_PLUGIN_DIR in plugins
-
I require getting the absolute path of a file in a specific plugin, and being able to refer to this path in different plugins, and possibly a page template here and there.
On the Codex I came across
WP_PLUGIN_DIR // full path, no trailing slash
which would fit my needs but the Codex recommends not using this constant in plugins..I echo’d the constant to see just what it contains and got the following “C:\xampp\htdocs\twitter/wp-content/plugins”, which brought up a second issue, why is there both backward and forward slashes?
- The topic ‘Problems using WP_PLUGIN_DIR in plugins’ is closed to new replies.