use the API, the functions of WordPress for save data and check before, it is an Multisite install; thats all. The first example is only for check, is the activated as network wide.
// if is active in network of multisite
if ( is_multisite() && isset($_GET['networkwide']) && 1 == $_GET['networkwide'] ) {
add_site_option( 'my_settings_id', $data );
} else {
add_option( 'my_settings_id', $data );
}
The follow example check for mutlisite and if the plugin active in complete network.
if ( is_multisite() && is_plugin_active_for_network( plugin_basename( __FILE__ ) ) )
$values = get_site_option( 'my_settings_id' );
else
$values = get_option( 'my_settings_id' );
Also you can check this in each blog and save the data in the tables of each blog.
*the examples was from this post
Related Posts:
- WordPress sharding: which multi-DB plugin to use?
- How to run Two WordPress blogs with different themes and with single database and same content
- Using Vagrant for customizable WordPress Multi-sites [closed]
- Is the wordpress user-model changed in wpmu?
- “Master” WordPress Multisite – Database Sync
- Storing Form data in a different database
- How to implement data residency in my WordPress site
- ‘Global’ settings page for multisite plugin
- How do I show data from gravity forms in my template? [closed]
- How to do I get a list of active plugins on my wordpress blog programmatically?
- How to add field for new site-wide option on Network Settings screen?
- Delete tables from database when deleting plugin
- Is it bad practice to create own table for a plugin?
- How to Add an Index to Plugin Database table
- How can I delete orphan keys in WordPress database tables?
- Is there a plugin that will override the “Error establishing a database connection” message? [closed]
- Making my plugin multi-site compatible
- How to tell if a plugin is multisite compatible?
- How to delete all records from or empty a custom database table?
- Plugin Development: WPMU or WP?
- What are these entries in the database? Looks similar to JSON
- Auto Load Plugin Hooks inside Must Use Plugin
- Creating two database tables via plugin
- How to properly insert data into custom table via plugin
- How Is Network Activate Different From Activate (by Implementation)?
- How to get the main blog’s id and db prefix from a mu plugin?
- How does WordPress handle MySQL row lock errors?
- How to make sense of the active_plugins option_value to enable and disable certain plugins from the database?
- Inherit plugin settings to new site in Multisite
- What is a Network Activated Plugin Exactly?
- How to empty wordpress custom post Database table
- How to install plugins in individual sites on a wordpress network?
- How to Check If A Plugin Is Enabled Through API?
- insert data in database table from plugin with WP3.1
- Simple form that saves to database
- Fatal error: Call to undefined function wp_get_current_user()
- How to tell if plugin has been network activated
- How does WordPress Multisite know that a Plugin is installed?
- $wpdb->get_results leaking memory
- Plugins or Tutorials for displaying data from SQL-db on WP-page? [closed]
- Insert query inserts 2 entries, should insert 1
- Can I enable/disable/hide plugins on a per-site basis in multisite?
- Is it a bad practice to go directly to the mysql database while developing a plugin?
- Updating WordPress – the best approach (updating wp core, plugins and db)
- How to enable Admins to see Plugins
- Sharing Ad Revenue among Users of a Multisite in a Collaborative Model?
- How do I check what plugins are enabled via the database?
- While using WordPress Multisite is it possible to display data to main site from subsites?
- Prevent multisite sites from using a plugin
- Is it possible to run plugin code when a multisite blog is deleted?
- How to store ACF custom fields data in a custom table
- Multi domain, multi sites with different themes and content
- Can I explicitly specify ENGINE=InnoDB in WordPress?
- Getting Custom Post Type content from main-site of a Multisite
- How to assign user a role if none is present when logging in
- How can a Firebase user registration and login be integrated into a WordPress site?
- How do I add a widget programmatically to a newly created site (WPMU) within a plugin?
- Bad Request (Invalid Hostname) on working server, database problem
- Plugin Not Working, But Only On GoDaddy Hosted site
- Duplicate settings of master blog to slave blogs in WP multi-site installation
- How can a plugin run a script after being updated in MultiSite?
- Create custom column in post table in wordpress
- Custom database or Custom Post Types?
- Network-Wide Plugin Settings Management
- How can I list only sites that use a particular theme or plugin?
- Aggregate Summaries of Posts of Different Blogs in Multisite Instance
- Posts wont expire
- Custom database table for plugin not creating on activation
- WordPress plugin DB upgrade
- Multisite functions to communicate with individual site functions
- WordPress network: set themes and plugins for new blog
- How to update widget_text in the wp_options table
- Is there a way to share content amongst wordpress sites
- Get the last post ID
- Add agenda items and notifications
- I’m trying to create security question field for my login page
- What is the function to get plugin base url in multisite?
- How to count number of records found in a database table?
- Should I global $wpdb outside of any of my plugin’s functions scope?
- prefix table and plugins
- Unique post-id for WordPress Multisite Network
- Taking WordPress table prefixes into account
- Changing BIGINT to INT
- How to install WordPress Multisite with different domains under the same subdirectory?
- How can I get a list of plugins and which blogs are using them?
- WordPress register_activation_hook table creation not working
- How to add Edit | Delete button on rows?
- Multiple Domains with Single WordPress Install
- Multisite: Activate plugin for subsites only?
- The plugin generated x characters of unexpected output, $wpdb not defined
- Duplicate a Multi-Site Subdomain
- How to get last_updated and newest_blogs in WP 3.0
- 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 show database content in wordpress post
- Setting up a multilingual wordpress site
- Display All Non-Used Plugins
- What is the easiest way to implement cascading database upgrade for my plugin?
- Multisite mu-plugins site-specific directory
- clean wp_options table unused rows