diff options
author | donncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36> | 2008-01-02 18:19:27 +0000 |
---|---|---|
committer | donncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36> | 2008-01-02 18:19:27 +0000 |
commit | 70e5c187ce118d85b8afa73e07e49892f3df0dda (patch) | |
tree | aa878f68c0be7a9c183d0e8ebd1edee1b382a250 /wp-includes | |
parent | d86b6c2ab7f0873ced781db7b99f9b9efb2b8c9e (diff) | |
download | wordpress-mu-70e5c187ce118d85b8afa73e07e49892f3df0dda.tar.gz wordpress-mu-70e5c187ce118d85b8afa73e07e49892f3df0dda.tar.xz wordpress-mu-70e5c187ce118d85b8afa73e07e49892f3df0dda.zip |
Allow blog and user welcome and signup notifications to be customized with a filter. Fixes #524
git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@1181 7be80a69-a1ef-0310-a953-fb0f7c49ff36
Diffstat (limited to 'wp-includes')
-rw-r--r-- | wp-includes/wpmu-functions.php | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/wp-includes/wpmu-functions.php b/wp-includes/wpmu-functions.php index 38d3e1c..76c9d7a 100644 --- a/wp-includes/wpmu-functions.php +++ b/wp-includes/wpmu-functions.php @@ -1053,6 +1053,10 @@ function wpmu_signup_user($user, $user_email, $meta = '') { // Notify user of signup success. function wpmu_signup_blog_notification($domain, $path, $title, $user, $user_email, $key, $meta = '') { global $current_site; + + if( !apply_filters('wpmu_signup_blog_notification', $domain, $path, $title, $user, $user_email, $key, $meta) ) + return; + // Send email with activation link. if( constant( "VHOST" ) == 'no' ) { $activate_url = "http://" . $current_site->domain . $current_site->path . "wp-activate.php?key=$key"; @@ -1072,6 +1076,10 @@ function wpmu_signup_blog_notification($domain, $path, $title, $user, $user_emai function wpmu_signup_user_notification($user, $user_email, $key, $meta = '') { global $current_site; + + if( !apply_filters('wpmu_signup_user_notification', $user, $user_email, $key, $meta) ) + return; + // Send email with activation link. $admin_email = get_site_option( "admin_email" ); if( $admin_email == '' ) @@ -1372,6 +1380,9 @@ function install_blog_defaults($blog_id, $user_id) { function wpmu_welcome_notification($blog_id, $user_id, $password, $title, $meta = '') { global $current_site; + if( !apply_filters('wpmu_welcome_notification', $blog_id, $user_id, $password, $title, $meta) ) + return; + $welcome_email = stripslashes( get_site_option( 'welcome_email' ) ); if( $welcome_email == false ) $welcome_email = stripslashes( __( "Dear User, @@ -1414,6 +1425,9 @@ SITE_NAME" ) ); function wpmu_welcome_user_notification($user_id, $password, $meta = '') { global $current_site; + if( !apply_filters('wpmu_welcome_user_notification', $user_id, $password, $meta) ) + return; + $welcome_email = __( "Dear User, Your new account is setup. |