Home Forums Bug Reports helpers_get_dir fails when plugins directory is symlinked


helpers_get_dir fails when plugins directory is symlinked

  • I’m working on a site where the plugins directory is symlinked into the wp-content directory.

    Unfortunately this makes the function helpers_get_dir fail. Instead of returning a url the plugin directory it returns it’s system path. This in turn leads to stylesheets and javascripts not loading.

    I’ve found that helpers_get_dir is called as a filter so in theory I guess it would be possible to add another filter that returns a correct path. But it seems that if I add such a filter in functions.php it doesn’t get defined ahead of the loading of acf.php…

    Has anyone got an idea of how to fix this? As now I have to make a “hack” in the function in acf.php file and it’s neither pretty or future safe.

    Best regards

  • Thank you! I guess defining a correct path on the WP_PLUGIN_DIR constant in my wp-config.php file will solve the problem. 🙂

Viewing 3 posts - 1 through 3 (of 3 total)

The topic ‘helpers_get_dir fails when plugins directory is symlinked’ is closed to new replies.