Network Only Plugin

http://strangework.com/2013/06/14/how-to-create-a-network-only-plugin-in-wordpress/

There is a lesser known piece of information that can be defined in the plugin header that tells WordPress to only show the plugin on the WordPress Multisite Network Plugins page. This will hide Pressbooks plugin from being displayed and activated at the site level in WordPress Multisite. To only allow Pressbooks to show at the Network Plugins level.

adding this one line to Pressbooks header code:

Network: true


Network Only Plugin Header:
/*
Plugin Name: Pressbooks
Plugin URI: https://pressbooks.com
Description: Simple Book Production
Version: 3.9.8.1
Author: Book Oven Inc.
Author URI: https://pressbooks.com
Text Domain: pressbooks
License: GPLv2
GitHub Plugin URI: https://github.com/pressbooks/pressbooks
Release Asset: true
Network: True
*/

3 Likes

We will avoid to the new users the posibility of activation in just one site of the installation.

1 Like

Hi @colomet—this looks great. Can you submit a pull request?

@brad This would be handy for Pressbooks mPDF too…

1 Like

Ok. i will do tomorrow.

2 Likes