‘Global’ settings page for multisite plugin

As a reference

To create network or global settings, you need to do the following

  • Add a settings page

    add_submenu_page( 'settings.php'... # cf options.php for blog level`
    
  • Add a global option

    add_site_option($key,$value)
    
  • Update a global option

    update_site_option($key,$value)
    
  • Get a site option

    get_site_option($key)
    

Global settings are saved to the sitemeta table (individual blog settings are saved to <blog_id>_options table

  • I think the Settings API functions at the blog level – so uses the options table, not sitemeta. So, you can’t use option groups and the like at the network level (please comment if I’ve got this wrong)

Leave a Comment