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.