cedaro / plugin-toggle Goto Github PK
View Code? Open in Web Editor NEWA WordPress plugin to quickly toggle plugin activation status from the toolbar.
A WordPress plugin to quickly toggle plugin activation status from the toolbar.
So I have bit of an edge case from hell. :) I am filtering additional plugins into list of active plugins, conditionally on a theme being loaded.
Plugin doesn't notice this, since list is cached in the transient and plugins page in admin wasn't visited.
Valid bug? So edge case it's my own problem? :)
See comments at 2c73cbe
Reported by @tnorthcutt on Twitter: https://twitter.com/tnorthcutt/status/608381149774286851
After #12, the screenshot is going to need to be updated.
I vaguely recall looking into listing plugins vertically in the past, but I'm not sure CSS columns were widely supported when this was originally released. This recent request reminded me to look into it. Browser support appears to be good enough to give it a shot again.
Personally, I find it easier to scan and locate a plugin with them listed vertically. It should also help keep the list from being disrupted as much when plugins are added or removed.
I must have missed this review, but this is a valid issue:
However if you are in a page that is part of the plugin you are toggling off, it will give you an error page which is startling the first time you see it.
It would probably be best to not hijack the redirect if there is an error. Need to determine the best way to detect errors, but it might just be a query arg: https://github.com/WordPress/WordPress/blob/master/wp-admin/plugins.php#L44
I am getting this error when I activated the plugin.
Fatal error: Call to undefined method PluginToggle_Toolbar::add_group() in /home/sites/grappler.tk/public_html/beta/wp-includes/admin-bar.php on line 738
Update
I think it is so because I did not activate the Debug Bar plugin before.
It happen even if the Debug Bar plugin is installed. This is in version 1.1.0
First off, great plugin, can't count how much time I waste just waiting on plugins page to load, then scrolling to find the plugin.
What do you think about using Ajax instead of directing to the plugins page? Either way i'll probably end up forking it and adding that feature in, just wanted to get your thoughts on it?
Thanks again, this is now added to my toolbox of plugins!
At the moment, when the plugins are grabbed to populate the transient, only the file name and plugin name are stored in the transient, and those values are given back as an associative array.
That means on each page load, the admin bar forces a check on each and every plugin to see if it is active or not. I'd like to see this active / deactive status stored within the transient, and the transient cleared / refreshed when a plugin is activated or deactivated.
With three bits of data, that then leads on to thinking about each plugin entry on the toolbar as an immutable object, containing properties of the file name, plugin name, and status. The class that the objects are derived from would then contain methods that can generate the relevant plugin toggle URL, whether it is a network related plugin, etc. This starts moving this plugin-toggle plugin to be a bit more OOP, since the methods are specific to the plugin entries, not this plugin functionality as a whole.
This would leave the transient as an indexed array of objects.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.