wpmu_welcome_notification [ WordPress Function ]
wpmu_welcome_notification ( $blog_id, $user_id, $password, $title, $meta = '' )
| Parameters: |
|
| Returns: |
|
| Defined at: |
|
Soorgelijke functies: wpmu_welcome_user_notification, wp_new_blog_notification, wpmu_signup_blog_notification, wp_new_user_notification, wpmu_signup_user_notification
Notify a user that her blog activation has been successful.
Filter 'wpmu_welcome_notification' to disable or bypass.
Filter 'update_welcome_email' and 'update_welcome_subject' to modify the content and subject line of the notification email.
Source
<?php
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 false;
$welcome_email = stripslashes( get_site_option( 'welcome_email' ) );
if ( $welcome_email == false )
$welcome_email = stripslashes( __( 'Dear User,
Your new SITE_NAME site has been successfully set up at:
BLOG_URL
You can log in to the administrator account with the following information:
Username: USERNAME
Password: PASSWORD
Log in here: BLOG_URLwp-login.php
We hope you enjoy your new site. Thanks!
--The Team @ SITE_NAME' ) );
$url = get_blogaddress_by_id($blog_id);
$user = new WP_User($user_id);
$welcome_email = str_replace( 'SITE_NAME', $current_site->site_name, $welcome_email );
$welcome_email = str_replace( 'BLOG_TITLE', $title, $welcome_email );
$welcome_email = str_replace( 'BLOG_URL', $url, $welcome_email );
$welcome_email = str_replace( 'USERNAME', $user->user_login, $welcome_email );
$welcome_email = str_replace( 'PASSWORD', $password, $welcome_email );
$welcome_email = apply_filters( 'update_welcome_email', $welcome_email, $blog_id, $user_id, $password, $title, $meta);
$admin_email = get_site_option( 'admin_email' );
if ( $admin_email == '' )
$admin_email = 'support@' . $_SERVER['SERVER_NAME'];
$from_name = get_site_option( 'site_name' ) == '' ? 'WordPress' : esc_html( get_site_option( 'site_name' ) );
$message_headers = "From: \"{$from_name}\" <{$admin_email}>\n" . "Content-Type: text/plain; charset=\"" . get_option('blog_charset') . "\"\n";
$message = $welcome_email;
if ( empty( $current_site->site_name ) )
$current_site->site_name = 'WordPress';
$subject = apply_filters( 'update_welcome_subject', sprintf(__('New %1$s Site: %2$s'), $current_site->site_name, stripslashes( $title ) ) );
wp_mail($user->user_email, $subject, $message, $message_headers);
return true;
}
?>
Examples [ wp-snippets.com ]
Top Google zoekresultaten
- WPMU Functions/wpmu welcome notification « WordPress Codex
Description. Sends a welcome email to new users after they have activated their account, it includes their username and password in the email for confirmation ...
codex.wordpress.org - WPMU remove wpmu_welcome_user_notification - WordPress
i wrote a plugin whick hooks the the 2 functions 'wpmu_welcome_notification' and 'wpmu_welcome_user_notification'. I simply killed the wp_mail calls in them ...
wordpress.org - wpmu_welcome_notification (WordPress Function) - WPSeek.com
WordPress lookup for wpmu_welcome_notification, a WordPress Function. wpseek.com is a WordPress-centric search tool for developers and theme authors.
wpseek.com - How to disable wordpress welcome e-mail?
Jun 9, 2011 ... add_filter( 'wpmu_welcome_notification', ' db_remove_new_site_notification_email' );. The default welcome e-mail message wasn't send.
premium.wpmudev.org