I authored a wordpress plugin for WordPress with a couple of user-configurable configurations which are saved using WordPress's recommended method. I understand they're trapped in the wordpress_options table, but that's abstracted through the WordPress options API.

Now I am attempting to give a "global override" from the configurations that may be set up within the Network Admin portion of a multi-site installation. I discovered the right hooks to create my configurations page, however aren't able to find any information on where you can save the information.

Basically save it while using normal options API, then your configurations get saved individually for every site. I am searching for a location in order to save them globally for those sites, therefore the wordpress plugin can first turn to find out if the configurations happen to be globally overridden through the server admin.

I'm able to just write some code to create straight to the wordpress_options table of among the sites (for instance site #1) as well as create my very own table. I understand how to complete many of these things, but I'd rather not do this if there is a preferred method to write mult-site plug ins.

Thank you for any advice.

You may already know the primary deference between creating a single WordPress wordpress plugin versus. a multisite wordpress plugin is how information is written. Based on this short article since plug ins ordinarily have complete reign more than one database, and perhaps the plug ins local pages files you have to make sure to only call the $wpdb global object rather than a tough-coded mention of the a table.

For instance, if you want to execute an SQL command around the posts table, then don't use wordpress_posts because the table title $publish_count = $wpdb->get_var($wpdb->prepare("Choose COUNT(*) FROM wordpress_posts"))

make use of this

$publish_count = $wpdb->get_var($wpdb->prepare("Choose COUNT(*) FROM $wpdb->posts"))

Please visit the article for more info.