wpmu_welcome_user_notification [ WordPress Function ]
| Parameters: |
|
| Returns: |
|
| Defined at: |
|
Notify a user that her account activation has been successful.
Filter 'wpmu_welcome_user_notification' to disable or bypass.
Filter 'update_welcome_user_email' and 'update_welcome_user_subject' to modify the content and subject line of the notification email.
Source
<?php
function wpmu_welcome_user_notification($user_id, $password, $meta = '') {
global $current_site;
if ( !apply_filters('wpmu_welcome_user_notification', $user_id, $password, $meta) )
return false;
$welcome_email = get_site_option( 'welcome_user_email' );
$user = new WP_User($user_id);
$welcome_email = apply_filters( 'update_welcome_user_email', $welcome_email, $user_id, $password, $meta);
$welcome_email = str_replace( 'SITE_NAME', $current_site->site_name, $welcome_email );
$welcome_email = str_replace( 'USERNAME', $user->user_login, $welcome_email );
$welcome_email = str_replace( 'PASSWORD', $password, $welcome_email );
$welcome_email = str_replace( 'LOGINLINK', wp_login_url(), $welcome_email );
$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_user_subject', sprintf(__('New %1$s User: %2$s'), $current_site->site_name, $user->user_login) );
wp_mail($user->user_email, $subject, $message, $message_headers);
return true;
}
?>
Examples [ wp-snippets.com ]
Top Google zoekresultaten
- WPMU Functions/wpmu welcome user 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
WPMU remove wpmu_welcome_user_notification (5 posts). lulewittchen. Member Posted 1 year ago #. How can I stop the mails sent when a new blog is ...
wordpress.org - Function Reference/wpmu welcome user notification « WordPress ...
Filter 'wpmu_welcome_user_notification' to disable or bypass. Filter ' update_welcome_user_email' and 'update_welcome_user_subject' to modify the content ...
codex.wordpress.org - wpmu_welcome_user_notification Wordpress hook details -- Adam ...
WordPress hook directory wpmu_welcome_user_notification. WordPress version history for wpmu_welcome_user_notification. This database has information ...
adambrown.info