Wordpress Plugin Execution Order

I just spent the last few hours trying to figure out what was wrong with my new Wordpress plugin. My plugin requires another plugin and what was happening was Wordpress was running my plugin first. This was the source of the problem and it took me awhile to figure that out. Then I had to figure out how to force Wordpress to run my plugin first. I tried a code solution but there isn’t any way to tell Wordpress in the code to run one plugin before the other. Then I tried modifying their order in the database but Wordpress kept rewriting the row I would change. So then I thought, alphabetical ordering. I don’t want to have to rename my plugin just because of some stupid limitation of the Wordpress plugin architecture. I noticed that it was running the plugins that had their own subdirectories first and then it would execute plugins that were just single files inside the plugins directory. Bingo. I removed the directory I had put my plugin from and just dumped it right in the plugins directory. Now it works beautifully. It was troubling me because I already had the plugin working on another blog (before I made the subdirectory modification) and was scratching my head why it wasn’t working here. Its all simple in retrospect.

4 Responses to “Wordpress Plugin Execution Order”

  1. david Says:

    Any plans to make this plugin do the same for furl, digg, reddit, etc?

    If not, what would I need to add to the code to make it go?

    Thanks for a useful plugin!

  2. admin Says:

    I started to but found that a lot of the social bookmarking sites offer the ability to import your bookmarks from delicious so I’ve been doing that manually every so often. I’ve got a ton of other projects I’ve been working on lately so I don’t have any immediate plans to integrate it with other sites. It would be a good idea though. This plugin drives a plenty of traffic to the sites I use it with.

    To get it working with other sites you’d need to first get it to login and then submit the new post the same way its currently written for delicious. Delicious publishes an API which made writing the plugin easy. I’ll work with you on making it work for these other sites if you want.

  3. david Says:

    Great — thanks for the email and for getting back to me. I started looking for something like this earlier today when I got an ad by email offering a plugin that does much the same for over $100. I thought, this is an awesome idea, but surely this can’t be that hard to do. So I was just reading the delicious API when I heard back from you. I’m under a pile of projects myself, but I’ll get to work on this later in the week and get back to you when I get stuck.

    It would be very cool to autobookmark posts to a dozen sites as soon as you hit the publish button — talk about traffic!

  4. david Says:

    OH — too cool — OnlyWire.com does it all, so I’ll just rework your plugin for that one, and it does the rest. Thanks again!

Leave a Reply

You must be logged in to post a comment.