How to Override A Function in ms-functions.php

Functions, which aren’t wrapped inside functions_exists() calls, are not meant to be pluggable. If you’re searching for extensions, then use filters or hooks – in case there’re some.

As you can read in the phpDocBlock:

Ensure that the welcome message is not empty. Currently unused.

So this filter won’t work.


I’m no MU expert, but maybe you can make use of the following filter:

apply_filters( 'wpmu_signup_blog_notification_email',
    __( "To activate your blog, please click the following link:\n\n%s\n\nAfter you activate, you will receive *another email* with your login.\n\nAfter you activate, you can visit your site here:\n\n%s" ),
    $domain, $path, $title, $user, $user_email, $key, $meta
)

You’d call it like this:

function wpse56797_signup_blog_notification_email( $message, $domain, $path, $title, $user, $user_email, $key, $meta )
{
    $message="Your custom notification";
    return $message;
}
add_filter( 'wpmu_signup_blog_notification_email', 'wpse56797_signup_blog_notification_email', 10, 8 );

Leave a Comment