Support » Plugins » Hacks » Getting the directory of another plugin

  • I’m writing a plugin wherein I need to get the directory of another plugin.

    The only functions that I’ve found that return a plugin directory all require a file within that plugin to be passed to them (e.g. plugin_dir_path( __FILE__ );).

    This obviously won’t work in my situation since I don’t have the plugin’s file.


    Thanks in advance.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Moderator bcworkz


    The option ‘active_plugins’ contains an array of the main filenames of all active plugins (relative to wp-content/plugins/).

    What do you mean by “option”, though.
    Is that a setting (get_option( ‘active_plugins’ );)
    or a global variable, or a function, or an action or filter?


    Moderator bcworkz


    I should have been more specific, I know as well as anyone that many WP terms are confusingly ambiguous. (heh, including ‘terms’)

    I mean an entry in the options table retrieved with get_option( 'active_plugins').

    Great. Thanks for the info.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Getting the directory of another plugin’ is closed to new replies.