You need to check that when you are activating the plugin. WordPress will send a Boolean flag to let your function know that this is a network wide activation.
register_activation_hook( __FILE__, 'activate' );
function activate( $network_wide ) {
// $network_wide will be TRUE if activation is network wide
if ( $network_wide ) {
... Do Stuff ...
}
...
}
Related Posts:
- ‘Global’ settings page for multisite plugin
- Making my plugin multi-site compatible
- Plugin Development: WPMU or WP?
- Auto Load Plugin Hooks inside Must Use Plugin
- How Is Network Activate Different From Activate (by Implementation)?
- Inherit plugin settings to new site in Multisite
- How to install plugins in individual sites on a wordpress network?
- How to Check If A Plugin Is Enabled Through API?
- Fatal error: Call to undefined function wp_get_current_user()
- Can I enable/disable/hide plugins on a per-site basis in multisite?
- How to enable Admins to see Plugins
- How to assign user a role if none is present when logging in
- How can a plugin run a script after being updated in MultiSite?
- Network-Wide Plugin Settings Management
- Is there a way to share content amongst wordpress sites
- How to install WordPress Multisite with different domains under the same subdirectory?
- Multisite: Activate plugin for subsites only?
- Error Message from W3 Total Cache when .htaccess Rules Cannot Be Modified? [closed]
- Get list of sites that uses specific plugin or theme
- How to make sexy bookmarks plugin work in WPMU
- How to setup a Network Plugin across the network with only my settings?
- WordPress language switcher
- get_option compatible with wordpress network (multisite)?
- Is it possible to set up multistore in Woocommerce? [closed]
- Cannot access wp-admin after disabling all plugin
- How to hide plugin from WordPress Multisite admin plugin list
- Is the wordpress user-model changed in wpmu?
- WordPress Multisite – get_plugin_data()
- Error 404 using wpml plugin
- How to define WordPress plugin shortcode globally for multisite?
- Unable to install theme recommended plugins on Multisite
- Convert existing WordPress Site (with several plugins) into Multisite
- Disable multisite-wide plugins on specific sites
- WordPress Multisite plugin delegation
- How do I tell what plugins are used on my multisite install?
- Multisite custom user activation emails – html
- Solutions to repost categories into multisite blogs?
- NGiNX + PHP5-fpm + CDN Tools (plugin) [closed]
- Any recommendation on how to manage ads?
- Plugins not showing in Multisite dashboard
- How can I force users to a particular subdomain to log in for MU (Multisite)?
- Does any one have Idea to get these functionalities with the plugin wp-multi-network
- Show function to super admin
- Generate pages from markdown files in github automatically
- WordPress multi domain – redirect
- How can I copy all users to newly created site on a multisite network in WordPress?
- WordPress wp-admin/network/plugin-install
- Create a multisite network for an existing installation
- “Micro-Site” Options
- How to create user that has permission to create new sites on WordPress with multisite option enabled?
- Configuring Propel to Work with Multisite
- Subdomains with almost the same content
- Uninstalling plugins across all sites
- Custom table naming/access convention for multisite: $table_prefix vs base_prefix or other?
- Users are being redirected to main site when trying to register on subsite of my Multisite network
- “Master” WordPress Multisite – Database Sync
- User Signup in Multisite – Need Plugin or Advice
- Certain functions are undefined when called form mu-plugins
- Understanding State in WordPress Multisites
- One sub site is slow while all others load fine, same theme & plugins [closed]
- How to display terms and conditions in post area?
- How to check wp_options’s rewrite_rules if current and existing are the same before flush the rules?
- How to integrate together a website currently hosted WordPress.com and a custom web application currently hosted on Azure?
- How to remove a CPT Menu from the Root Admin only
- Cannot add edit themes and add plugins after multisite update
- Storing Form data in a different database
- how to make a wplang for network fill automatically
- Plugin to create unlimited custom shortcodes?
- After enable multisite enviroment in wordpress site creation wizard not working
- Best method of implementing compartmentalized custom post types on a multi-site network
- In a WPMU that uses several different domains, how to enable users to register subdomains of any domain from the main site?
- In Multisite Setups, how to update mass sections of sub-sites
- WP Forms not displaying,becomming an fatal error
- disable plugin activation on no multisite
- How to Fix WordPress multisite woocommerce 403 file error
- How to capture hidden values with Gravity Forms
- How to use get_blogs_of_user?
- Multisite converted to Single Site can’t add new plugins or new themes
- Install/Enable/Activate plugin on multisite without access to master site
- Category as Subdomain for One WP Install
- Renamed plugin folder and when I changed back nothing was activated
- How To Add Code To WP Without Plugin or Functions
- How to make wp multisite subdomain exist search
- How to Call Function From Separate WordPress Install on Same Server?
- Specific plugin script not working on subdomain
- Coming soon pages with rest of site in maintenance mode
- Query Shortcode from a multisite to appear on a different site?
- How to enable Admins to see Plugins
- Multiple Accounts on 1 email – Multisite
- Show image or notification on specific blog in multisite
- Force Network Activated Plugin to Run After Site Level Plugins
- How to set the default options on an existing plugin in a WP MU new user install
- Custom plugin breaks css.php on Multisite
- Check if user is in a group of another site within multisite network [closed]
- WordPress multisite haml templates
- Trying to output a “Most visited blogs” list in wordpress multisite
- Managing database tables in WordPress multisite
- Add custom fields in the new and edit the site forms without touching the WP core
- why i cannot see some plugins while they are enabled on network admin page?
- Change email notification language based on the site language in WPForms