WordPress.org

Ready to get started?Download WordPress

Forums

Problems using WP_PLUGIN_DIR in plugins (1 post)

  1. darrenmeehan
    Member
    Posted 1 year ago #

    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?

Topic Closed

This topic has been closed to new replies.

About this Topic