Support » Plugins and Hacks » Getting wp-content path from plugin

  • What is the best way to get the path to wp-content from a plugin.

    I’m currently using
    $wp_content_directory = realpath(dirname(__FILE__) . '/../../');
    but it seems pretty ugly. I’m also worried that someone could have files in a non-standard location.

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Getting wp-content path from plugin’ is closed to new replies.