For network option pages the correct form action URL is:
wp-admin/network/edit.php?action=your_option_name
Then you have to register a callback:
add_action(
'network_admin_edit_your_option_name',
'your_save_network_options_function'
);
In that callback function inspect the $_POST
data, prepare the values, then save them:
update_site_option( $this->option_name, $this->option_values );
And then you have to create the redirect without further help:
// redirect to settings page in network
wp_redirect(
add_query_arg(
array( 'page' => 'your_options_page_slug', 'updated' => 'true' ),
(is_multisite() ? network_admin_url( 'admin.php' ) : admin_url( 'admin.php' ))
)
);
exit;
On the options page check $_GET['updated']
, and add an admin notice if you found that parameter.
Related Posts:
- Determining the compatibility of Settings API & Multisite
- Multisite Equivalent of `register_setting`?
- register_setting() for single site vs update_site_option() for mu
- What are options are there to implement a multi language site
- Where is the robots.txt stored for a WordPress Multisite install?
- Use wp_nav_menu() to display a Menu from another site in a Network install?
- How to set an option for all sites in my network?
- How to set up wordpress domain mapping on MAMP Pro
- How to hide admin account in BuddyPress? (for security reasons)
- Automatic Upgrade Filters in Multisite
- wp-cli is not working properly. No response from commands
- Unable to login to new custom domain on multisite?
- Generate WP-CLI @alias for each site on multisite
- Shared Content but “Updatable” Through the Main Site
- How to Set up a Multisite WordPress?
- How to customize the wp-signup.php for a multisite network?
- How to Limit Bandwidth for Multisite?
- ID’s being stripped out of editor for Admin user in Multi-Site
- Change management solution for BP-based site?
- How to Structure WordPress for an Organization and its Departments?
- (How) Can I change my Multisite Network to use a different blog as Primary?
- Multisite non www domain gives registration error but should redirect to www.domain.com
- How to get the via url (or site name) on a wordpress network’s home page?
- WordPress multisite htaccess
- get_current_site() not returning site name
- Subdirectory multisite – only root admin available on NGINX
- Add custom user fields in Multisite USERS page
- WordPress multisite with multiple parent domains
- WP 4.4 – domain mapping for sites within a multisite network?
- Can I use two different domain names with a WordPress multisite network?
- Restrict Admin Capabilities in MultiSite
- Installing multisite on domain with existing subdirectory wordpress installations
- wp_redirect not working on admin menu page
- How to disable the default WordPress redirect to non-www URLs?
- Bulk theme settings in wordpress multisite
- Should I use a multisite installation to achieve a multi-language site?
- Multisite domain naming
- Switch a single site to a multi-site
- migrate a MU sub blog to a single install
- Preferred method of setting user role only works on Main Site in Network
- How to share primary navigation of main site with subsites usining switch_to_blog
- Register submenu on network menu from the subsite
- new multisite, old db
- Multisite sub-directories IIS 7.5 change media/uploads location
- One Domain, Two Installs of WordPress
- add_rewrite_rule not working in WordPress Multisite
- Create a page for a theme only
- How do I find where the current value of the option ‘registration’ in the SQL database?
- Can’t access Dashboard of a Multisite WordPress. Chrome results in “ERR_TOO_MANY_REDIRECTS”
- is_main_site() Always Returns True
- How do I get the site url from a Block (within the block editor)
- Strange multisite issue where all sites return same id with get_current_site()
- Permalink with a Category and then a Post
- Creating a subdomain network in a subdomain
- Multisite – One Site with multiple URLs
- Sub-sub folders of WordPress Multisite subdirectory
- Delete all user’s meta without knowing all the ‘key’
- Allow editors to switch sites (Multisite)
- moving tables between multisite installs
- How much resources are good enough for 3.9.2
- Best Practise: Linking to WPMU sites from other sites
- Stylesheet and JS linking error in WP multisite nested path
- Common user login for two different wordpress installation and bbpress
- Can I run multiple blogs from my local machine
- Trouble with SQL SELECT inside switch_to_blog()
- WordPress Multisite and how to apply sef urls only to specific sites
- Custom css – WordPress Multisite
- Migrating from domain mapping plugin to native domain mapping
- how to convert a wp multisite into a single site with content from subsites
- Getting stylesheet error after setting subdomain to false in multisite
- “Multisite support is not enabled.” After Multisite Config Changes
- String translation within WordPress multisite with i18n not working on all sites
- Add new sites on the same level as the parent URL in a multisite
- Search returns “Nothing Found” on a sub directory
- Add radio button on theme at the select of the theme the same theme should be activated after generation of new site in multi site
- Define default settings for new sites on multisite network with mu-plugin
- Users getting linked unwanted to main mu in WordPress multisite (WPMU)
- Multisite + wp_mail – Route Via Site Conditionally
- WordPress automatic Login on other page?
- Multisite: How to bypass wpmu_signup_user_notification and add my own notification logic?
- Changed singlesite to multisite, but new site shows Maintenance
- multisite shared settings
- Multi Site Translate Strings
- Multisite Demo Data for New Site
- Responsive Wordress Site – Serve different post types to each device
- Should I use MultiSite for a subdomain based wp site?
- Can’t import posts in multisite
- How to apply specific plugins to affect all sites (Multisite Network)
- Admin user getting redirected to /wp-admin/user
- Getting 404 after Update in Multisite
- Is there a way to have wordpress 301 versus 302 urls by default?
- first load of the page gives 404 error
- Some Subdomains on a Multisite Install Not Found
- personal_options hook on WordPress multisite
- Multi site root site installed on subdomain, with child sites as subdirectories
- Integrating WordPress for blog and other content pages in a web app
- wordpress multisite with already existing subdomain
- Why the sites dropdown in multi-site installation is different from the list of sites when seen full page?
- WPML is blocking WP core update
- Multisite: Redirect a deleted site – Best practice?