WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Getting the Plugin Directory (3 posts)

  1. golddave
    Member
    Posted 7 years ago #

    I have a plugin that creates a link in a post. I'd like to add an icon to every link. The icon image file will live in the same directory as the plugin. How would I reference this directory programatically for the purpose of writing the img src tag?

    Thanks,
    Dave

  2. whooami
    Member
    Posted 7 years ago #

    look at how other plugins handle paths.

    thats the easiest thing to do.

  3. golddave
    Member
    Posted 7 years ago #

    OK. I'm an idiot. I can use dirname(__FILE__). I've been out of the php game for the last few months and I have to re-learn things that used to be simple to me.

Topic Closed

This topic has been closed to new replies.

About this Topic