Plugin Organizer
This is a plug in that we developed to help with a project. It allows you to change the load order of your plug ins. If you need one plugin to load before another then this is the plug in to do it. To download the plugin please go to the WordPress plugin page.
This is a screenshot of the WordPress plugin page after Plugin Organizer has been applied. There is a Drag column added that allows you to grab a row in the plugin table and move it up or down to change the load order. After ordering the plugins you just click on the Save Order button and the load order is changed.
This is a screenshot of the plugin settings page.
This is a screenshot of the global plugins page. Here you can disable a plugin for the entire site. This allows you to turn it on for just the pages you need it.
This is a screenshot of the URL admin page. Here you can set the plugins that will be disabled/enabled based on the URL being accessed on your site.
This is a screenshot of the page edit screen. You can disable or enable plugins from here. This meta box will be added to all post types that are selected on the settings screen.







Oh, I forgot to ask about the loading sequence. Does your plugin only effect the page as it’s loading?
How does that panel effect the way WP loads at the admin level? Am I correct that it has no effect? Further to that, it doesn’t matter what the loading sequence is of any backend plugin, correct?
I disable all the plugins using your settings panel. How does the load sequence for those plugins factor into any of this until I place it on the post/page?
Many thanks.
Zena
My plugin is loaded before WP is loaded and then it modifies the array of plugins that need to be loaded.
I guess I misspoke, the load order is effected on the admin panel, but plugins don’t get disabled on the admin panel. I want to make that possible at some point.
The plugins are loaded in the same order no matter if they are disabled or not. So an array is created with the order that you have set. As this array is being created my plugin prevents disabled plugins from being put into that array. Then WP loops through that array and loads all plugins it finds.
Wow, thank you for the wonderful detailed reply. This is exactly what I need.
I have been thinking about this since I activated your plugin manager yesterday. I have news site on WP.com and am working on a redesign for WP.org going right for WP 3.2 beta2. I have a lot of content organized by categories and I’d like each category to have a distinct look.
I love that the plugins remain functional at the admin panel; I hadn’t gotten that far yet because I’m trying to solve jQuery issues.
You say I can disable all plugins (I love this idea) but what about SEO type plugins?
What about the cache type plugins? Turn them off too?
What about custom fields? If I am using then on the document being served, then I assume they must be activated for that page. Correct?
Thanks again,
Zena
My plugin is loaded before the WP object is even created so it can disable any type of plugin unless they are in the mu-plugins folder. These plugins are loaded differently.
Custom fields are built into wordpress so the plugin that created them doesnt need to be loaded to display them. Unless the plugin is displaying the custom fields. I use custom fields in theme files. I also have plugins that display custom fields. So it all depends on how the fields are being displayed.
Could you please add some information about how this helped your client?
Can you write something on the effects of changing the loading sequence?
How many of my backend plugins can I disable and still properly serve the page?
Any additional comments about your experiences would be very helpful to me at this time.
Thank you. Zena
Q. Could you please add some information about how this helped your client?
A. I originally wrote this plugin because the page peel plugin was loading a flash movie on the mobile version of a clients site. In order prevent the flash from loading on the mobile site the mobile plugin had to be loaded before the page peel plugin. WordPress didnt have them ordered this way by default so I had to manually edit the active_plugins option in the database. Since wordpress reorders the plugins whenever a change is made the plugins would not stay in the order I had set. So i created this plugin to keep my order set.
Q. Can you write something on the effects of changing the loading sequence?
A. The above is one answer to your question. Changing the order of your plugins can have a huge effect on your site. If one plugin loads a library that needs to be used in another putting them in the wrong order can cause issues. It can also fix issues if you order them correctly.
Q. How many of my backend plugins can I disable and still properly serve the page?
A. You can disable all of your plugins and your site will act as if you didnt have any plugins installed. The only exception is if you are in the admin. This plugin does not prevent plugins from loading on the admin pages. I found out early on in development that doing that can cause serious issues. I’m hoping to add that in some time but with the issues I had I decided to stick with the public side for now.
Any additional comments about your experiences would be very helpful to me at this time.
This plugin is currently running on the site it was originally written for and has cut down the load time of pages considerably as well as preventing the flash movie from loading when it isn’t needed. I have this running on several sites and havent found any conflicts with any other plugins.
This plugin is functioning on my localserver test WP 3.2 Beta2 18161
I am releasing a new version of this plugin in a few minutes. It is version 0.9. It has a few fixes and adds some new functionality. I looked in version 0.8.3 and line 64 is blank so I’m not sure what version you are running. Install 0.9 and see if you still get the error. If you do let me know and I can track it down. As for the multisite menus I will have to look into that. I’ve finished everything I wanted to get done before version 1 was released. I’m going to be doing bug fixes and maybe I can implement multi site menus with version 1.
Hi Jeff,
I love the concept of this plugin. I’ve just installed it to evaluate:
1. Error message: Warning: in_array() [function.in-array]: Wrong datatype for second argument in /home/content/31/7500231/html/sportslife/wp-content/plugins/plugin-organizer/lib/PluginOrganizer.class.php on line 641
2. This is a multisite. Is it possible to have the menus placed in the network admin rather than the main site since it is the most global and that is where, on a networked site, that you manage the plugins.
Hopefully this will work for us because you are right on – much needed. Thanks.
If its working for you can you rate it on wordpress.org? Glad I could help.
Thanks Jeff, it works now!! Strange because you said the MU file was missing, but I had definitely placed it where the docs said it needed to go. Anyway, it’s working and I must say…
This plugin ROCKS!!!!!!! This is EXACTLY what I’ve been needing for weeks, and the load times on my site are already improving a great deal by shutting off plugins not needed on all pages.
GREAT WORK! 12 thumbs up!!
Jonathan
Yep I checked that it was still enabled, and it was (and still is now).
I’ll email you the login info and you can try to get it working, that would be really awesome thanks!!
Jonathan
After reactivating the plugin did you go through the steps of checking the enable checkbox on the settings page, going to your homepage and returning to the settings page to see if it is still enabled? This is a security check I put in to prevent people from using an out of date version of the MU plugin. I figured it might cause some issues but it’s an important prevention measure that I’m not sure how to handle any differently. It does work. I have it running on 10+ sites. Maybe you could create me a temporary user to set the plugin up for you? If you want to do this you can email the user info to me at jeff@nebraskadigital.com.
Yes it was very tricky to get this plugin created and I saw the same discussions and got very discouraged but I did eventually figure it out. The only way to do it that I found was using the MU plugin functionality.
Interesting… sure enough, selective loading was again disabled. So I deactivated the plugin and reactivated it, then visited my site page. No change. I went and checked the plugin status – still enabled. Edited the page and made sure all plugins were disabled – they were. Updated the page again to make sure they were recorded in the DB – they are. Visited the page again – all plugins active as normal.
So I’m at a loss as to what else to try. This selective loading business just simply doesn’t work.
The interesting thing to me is that in my weeks of researching a way to do this, I found many heated discussions among developers about why this is impossible. The theory as I understand it is that at plugin load time, WP has no idea what page is being requested, therefore not loading or loading a certain plugin based on the page, is impossible.
I don’t want to believe this is true, and given that you have a plugin which does exactly this… I’m inclined to believe it must be possible. I just wish I could get it to work!
Any other ideas at all??
Jonathan
Make sure you deactivate and reactivate the plugin so that the database is updated. This is done when the plugin is updated through the wordpress admin but not if you update the files manually.
Go to the Plugin Organizer settings page and make sure enabled is checked. Then go to your sites homepage. Then go back to the Plugin Organizers settings page and see if the radio button has been changed to disabled. If it is disabled you have the wrong version of the MU plugin in place. Other than that I’m not sure what could be causing it.
Oops, ok strike the above… when I updated the selective loading feature apparently was disabled again. I’ve enabled it and now I see the custom meta boxes!
Too bad they don’t do anything.
I can disable a plugin and it still loads every time… no change at all. I can disable ALL plugins even, and there’s no change.
Any suggestions?
Jonathan
OK, updated and now the global plugins page loads. However I’ve turned off some plugins globally and they still work like always, there’s been no change.
Also still no custom meta in page or post editor.
Jonathan
Thanks, I did move the file into the MU folder though, and nothing changed. I don’t get any options to select plugins per page, anywhere. No custom meta box, nothing. I even checked Screen Options to make sure it wasn’t hidden, and it isn’t.
I’ll try updating to 0.8.1 just in case that changes anything… not sure what else to try and I really need this functionality.
Thanks,
Jonathan
I fixed the plugin on wordpress .org. Download the latest version which is 0.8.1. This has the globalPlugins.php file in it. I missed committing that to svn somehow. As for the disabling plugins feature you must create the wp-content/mu-plugins folder if it isnt created for you . Then move the wp-content/plugins/plugin-organizer/lib/PluginOrganizerMU.class.php file to the mu-plugins directory. Then go to the Plugin Organizer settings page in your dashboard. There is a setting to enable this feature. The plugin tries to move this file into place for you but can’t always do it. Make sure you always move this file into the mu-plugins folder whenever you update. It does a check and disables itself if your versions don’t match. If the mu-plugins folder is writable by the user that runs your webserver then the plugin will automatically do this for you.
Hi there, I’ve been trying to get selective plugin loading to work for weeks and just can’t seem to. I also get an error if I try to select the Global Plugins option:
Warning: require_once(/wp-content/plugins/plugin-organizer/tpl/globalPlugins.php) [function.require-once]: failed to open stream: No such file or directory in /wp-content/plugins/plugin-organizer/lib/PluginOrganizer.class.php on line 166
the file globalPlugins.php does not exist in my install, where can I get it?
As for selective loading, the custom meta box does not appear for me at all.
I’ve just updated to 0.8 version today and am running WP 3.1.1. Appreciate any help!
Thanks,
Jonathan
You are running an old version of the plugin. I have fixed that error. The plugin is at version 0.7.3 right now.
I have required wordpress version 3.1 for the newer versions because I think some of the functionality I’m using requires the newer jQuery libraries but I haven’t tested lower than 3.1. If you aren’t getting the upgrade notices you can go to the wordpress plugin page at http://wordpress.org/extend/plugins/plugin-organizer/ to download the latest version. If you are running a version of wordpress lower than 3.1 let me know or give it a working vote on the plugin page at wordpress.org for that version.
I’m releasing an update some time this weekend to add custom post type support. If you see any other problems let me know and I’ll try to get them fixed with the next release. Thanks for your feedback.
Hi,
The idea of this plugin is exactly what I need, I’ll keep an eye on its updates
I found a little bug : when you edit, select plugins you want to disable and click save ==> the list is not saved.
the error comes from lib/PluginOrganizer.class.php around line 160
the code
var pluginList = jQuery(‘input[name=group[]]’);
should be
var pluginList = jQuery(‘input[name="group[]“]’);
also a checkbox to select all plugins in this page would be useful, but I think that this is an early version and such things will come later
keep up the good work
Regards