WordPress.org

Making WordPress.org

Opened 2 months ago

Last modified 20 hours ago

#3202 assigned enhancement

Allow WordCamp organizers to activate/deactivate whitelisted plugins

Reported by: iandunn Owned by: RMarks
Milestone: Priority: normal
Component: WordCamp Site & Plugins Keywords: needs-patch good-first-bug
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.

Change History (5)

#1 @coreymckrill
2 months ago

Good idea. Here's a tentative list of plugins that could be whitelisted:

  • campt-indian-payment-gateway/campt-indian-payment-gateway.php
  • camptix-kdcpay-gateway/camptix-kdcpay.php
  • camptix-mercadopago/camptix-mercadopago.php
  • camptix-pagseguro/camptix-pagseguro.php
  • camptix-payfast-gateway/camptix-payfast.php
  • camptix-trustcard/camptix-trustcard.php
  • camptix-trustpay/camptix-trustpay.php
  • camptix-mailchimp/camptix-mailchimp.php
  • polldaddy/polldaddy.php

#2 @iandunn
7 weeks ago

#3052 was marked as a duplicate.

#3 @iandunn
7 weeks 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 @RMarks
11 days 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 @coreymckrill
20 hours 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.
Note: See TracTickets for help on using tickets.