WordPress.org

Support

Support » Plugins and Hacks » How to get a plugin path (directory)

How to get a plugin path (directory)

  • Hi all!

    I want to get the plugin directory for a specific plugin, how can I do this? The target is show a image hosted on my plugin directory inside a widget. Something like this:

    function my_plugin_widget() {
    ...
    $dir = fn_to_get_plugin_directory();
    echo "<img src='{$dir}/img.gif' />";
    ...
    }

    Is it possible? Anyone have another suggestion for how can I do this?

    Thanks!

Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘How to get a plugin path (directory)’ is closed to new replies.
Skip to toolbar