The network_sites_updated_message_{$_GET[‘updated’]} WordPress PHP filter allows you to modify a specific, non-default site-updated message in the Network admin.
Usage
add_filter('network_sites_updated_message_example', 'custom_update_message', 10, 1); function custom_update_message($msg) { // your custom code here return $msg; }
Parameters
$msg
(string): The update message. Default is ‘Settings saved’.
More information
See WordPress Developer Resources: network_sites_updated_message_{$_GET[‘updated’]}
Examples
Change the message after updating a site
Modify the update message after updating a site in the Network admin.
add_filter('network_sites_updated_message_updated_site', 'update_site_message', 10, 1); function update_site_message($msg) { $msg = 'Site successfully updated!'; return $msg; }
Display a message after activating a plugin
Show a custom message when a plugin is activated in the Network admin.
add_filter('network_sites_updated_message_plugin_activated', 'plugin_activation_message', 10, 1); function plugin_activation_message($msg) { $msg = 'Plugin successfully activated!'; return $msg; }
Notify user after a theme update
Notify the user with a custom message after a theme update in the Network admin.
add_filter('network_sites_updated_message_theme_updated', 'theme_update_message', 10, 1); function theme_update_message($msg) { $msg = 'Theme successfully updated!'; return $msg; }
Display a message after creating a new site
Show a custom message after creating a new site in the Network admin.
add_filter('network_sites_updated_message_site_created', 'site_creation_message', 10, 1); function site_creation_message($msg) { $msg = 'New site successfully created!'; return $msg; }
Display a message after deleting a site
Show a custom message after deleting a site in the Network admin.
add_filter('network_sites_updated_message_site_deleted', 'site_deletion_message', 10, 1); function site_deletion_message($msg) { $msg = 'Site successfully deleted!'; return $msg; }