wpmu_signup_user_notification [ WordPress Function ]
| Parameters: |
|
| Returns: |
|
| Defined at: |
|
Notify user of signup success.
This is the notification function used when no new site has been requested.
Filter 'wpmu_signup_user_notification' to bypass this function or replace it with your own notification behavior.
Filter 'wpmu_signup_user_notification_email' and 'wpmu_signup_user_notification_subject' to change the content and subject line of the email sent to newly registered users.
Source
<?php
function wpmu_signup_user_notification($user, $user_email, $key, $meta = '') {
if ( !apply_filters('wpmu_signup_user_notification', $user, $user_email, $key, $meta) )
return false;
// Send email with activation link.
$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 = sprintf(
apply_filters( 'wpmu_signup_user_notification_email',
__( "To activate your user, please click the following link:\n\n%s\n\nAfter you activate, you will receive *another email* with your login.\n\n" ),
$user, $user_email, $key, $meta
),
site_url( "wp-activate.php?key=$key" )
);
// TODO: Don't hard code activation link.
$subject = sprintf(
apply_filters( 'wpmu_signup_user_notification_subject',
__( '[%1$s] Activate %2$s' ),
$user, $user_email, $key, $meta
),
$from_name,
$user
);
wp_mail($user_email, $subject, $message, $message_headers);
return true;
}
?>
Examples [ wp-snippets.com ]
Top Google zoekresultaten
- WPMU Functions/wpmu signup user notification « WordPress Codex
Description. Sends an activation email to new users after they have completed the signup process, it includes their activation link.
codex.wordpress.org - Function Reference/wpmu signup user notification - WordPress Codex
Filter 'wpmu_signup_user_notification' to bypass this function or replace it with your own notification behavior. Filter 'wpmu_signup_user_notification_email' and ...
codex.wordpress.org - wpmu_signup_user_notification Wordpress hook details -- Adam ...
WordPress hook directory wpmu_signup_user_notification. WordPress version history for wpmu_signup_user_notification. This database has information for all ...
adambrown.info - Filter wpmu_signup_user_notification - WordPress Expert
Nov 1, 2011 ... Problem: WordPress MultiSite sends user signup mails from the main site. This is a problem when using domain mapping functionality as the ...
daankortenbach.nl