• joho68

    (@joho68)


    When hooking activated_plugin (for example), the hook is called with two parameters, $plugin and $network. It looks like $plugin contains only relative path information. If I want to use the get_plugin_data() function, it wants an absolute path.

    How do I obtain this absolute path, given the relative path passed to me, the WordPress way? Everywhere I look, it explicitly states that the WP_PLUGIN_DIR and WPMU_PLUGIN_DIR constants are for internal use only.

    Sorry if this has already been beaten to death here and elsewhere. And, please do not suggest I pass __FILE__ to some function. I don’t want to find out the absolute path to my own code.

    I’m obviously doing something wrong, and am hoping for someone to tell me what that wrong is ??

    -joho

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Relative plugin paths in some places, absolute paths in other places?’ is closed to new replies.