WordPress.org

Ready to get started?Download WordPress

Forums

Problems using WP_PLUGIN_DIR in plugins (1 post)

  1. darrenmeehan
    Member
    Posted 10 months 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?

Reply

You must log in to post.

About this Topic

  • RSS feed for this topic
  • Started 10 months ago by darrenmeehan
  • This topic is not resolved
  • WordPress version: 3.5.1