WordPress – Change Multisite ‘Site Added’ Message

I am looking to change the updated message that is displayed when adding a new site in wordpress multisite. I know I can go in and update the wp-admin/network/site-new.php but I am wanted to add to my functions file for to avoid update errors.

Related posts

Leave a Reply

1 comment

  1. You can replace in HTML by using java-script.
    Just need to replace text ‘Site Added.’ with your own custom message.
    Here is the complete code that you need to add to your plugin.

    function custom_admin_js() {
    
        echo "<script type='text/javascript' > 
    
    document.body.innerHTML = document.body.innerHTML.replace('Site added.','custom message');
    
     </script>";
    
    }
    add_action('admin_footer', 'custom_admin_js');
    

    I hope that helps.