#3202 closed enhancement (fixed)
Allow WordCamp organizers to activate/deactivate whitelisted plugins
Reported by: | iandunn | Owned by: | RMarks |
---|---|---|---|
Milestone: | Priority: | normal | |
Component: | WordCamp Site & Plugins | Keywords: | needs-patch needs-testing |
Cc: |
Description
There are several plugins installed on WordCamp.org that aren't network-activated, but that organizers occasionally want to activate on their sites. Currently, they have to request a member of the community team manually activate it for them.
WordPress 4.9 enhances the `activate_plugin` and `deactivate_plugin` capability checks to accept a specific plugin. That means we can now easily let organizers activate those plugins themselves.
Activating or deactivating any plugin not in in the whitelist should still require the manage_network
capability.
Attachments (1)
Change History (13)
#3
@
7 years ago
I'd like to leave Polldaddy off the list for now, since I think we can actually get rid of that. Jetpack has a shortcode for it, so it's just a matter of making sure that disabling it doesn't break old sites.
The organizer handbook has a list of the other plugins we'd want to whitelist.
#4
@
7 years ago
I'm interested in taking a stab at this. Should this be code in a new or existing plugin? Possibly a mu-plugin?
My approach would be to let any organizer with the admin role on a WordCamp site be able to activate or deactivate a plugin if on the list.
Per Corey and Ian's suggestions, plus three more I've found in the plugin repo (which I've bolded below), here are the list of plugins this should allow:
bbpress/bbpress.php
campt-indian-payment-gateway/campt-indian-payment-gateway.php
campt-instamojo-payment-gateway/camptix-instamojo.php
campt-razorpay-payment-gateway/camptix-razorpay.php
camptix-kdcpay-gateway/camptix-kdcpay.php
camptix-mercadopago/camptix-mercadopago.php
camptix-pagseguro/camptix-pagseguro.php
camptix-payfast-gateway/camptix-payfast.php
camptix-payment-payupaisa/camptix-payupaisa.php
camptix-trustcard/camptix-trustcard.php
camptix-trustpay/camptix-trustpay.php
camptix-mailchimp/camptix-mailchimp.php
edit-flow/edit_flow.php
liveblog/liveblog.php
#5
@
7 years ago
- Owner set to RMarks
- Status changed from new to assigned
@RMarks Cool! I'll make you the owner of this one. I personally think an mu-plugin would be the best approach here.
Regarding the additional three plugins you found:
- camptix-instamojo.php and camptix-razorpay.php are deprecated in favor of campt-indian-payment-gateway.php
- camptix-payupaisa.php isn't installed on WordCamp.org, and I suspect it is also deprecated, so I would probably leave it off the list at this point.
This ticket was mentioned in Slack in #meta-wordcamp by rmarks. View the logs.
6 years ago
#9
@
6 years ago
Thanks for the patch Ryan. IIRC, we talked about re-mapping the (de)activate_plugin
caps at the WCUS contributor day, but couldn't figure out how. I took another look at it, and got it working in r8013.
Good idea. Here's a tentative list of plugins that could be whitelisted: