Enable Pre-Approved Plugins From Your Dashboard

Starting today, administrators (specifically anyone with the manage_options capability) can enable any of our pre-approved plugins directly from the administration area of your site. No longer do you need to get your developer involved simply to enable a new plugin on your site — you can do it yourself by visiting the “Plugins & Services” menu found in the VIP section of your WordPress dashboard.

However developers can still forcibly enable a plugin for all sites using that theme with the wpcom_vip_load_plugin() helper function. Plugins loaded using this method cannot be disabled from the administration area of the site.

Prefer not to have administrators enabling new plugins on your site? Have your developer add wpcom_vip_plugins_ui_disable_activation(); to your theme’s functions.php file and the plugin activation links will be disabled.

You can also use this functionality in your development environment if you’d like by adding the following code to your theme:

if ( ! function_exists( 'wpcom_is_vip' ) ) {
	require_once( WP_CONTENT_DIR . '/themes/vip/plugins/vip-do-not-include-on-wpcom/wpcom-vip-plugins-ui/wpcom-vip-plugins-ui.php' );
}

It will add a new menu item to the “Plugins” menu.

3 thoughts on “Enable Pre-Approved Plugins From Your Dashboard

    • Oops, fixed.

      Before I selected activate_plugins as the capability to use, I tested to make sure that this was a capability that administrators had on WordPress.com. I realize now that my testing was flawed (calling current_user_can() too soon). I have changed the capability to manage_options and added a filter on the value while I was at it.

Comments are closed.