wpmu_signup_blog_notification [ WordPress Function ]
| Parameters: |
|
| Returns: |
|
| Defined at: |
|
Notify user of signup success.
This is the notification function used when site registration is enabled.
Filter 'wpmu_signup_blog_notification' to bypass this function or replace it with your own notification behavior.
Filter 'wpmu_signup_blog_notification_email' and 'wpmu_signup_blog_notification_subject' to change the content and subject line of the email sent to newly registered users.
Source
<?php
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 false;
// Send email with activation link.
if ( !is_subdomain_install() || $current_site->id != 1 )
$activate_url = network_site_url("wp-activate.php?key=$key");
else
$activate_url = "http://{$domain}{$path}wp-activate.php?key=$key"; // @todo use *_url() API
$activate_url = esc_url($activate_url);
$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_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
),
$activate_url,
esc_url( "http://{$domain}{$path}" ),
$key
);
// TODO: Don't hard code activation link.
$subject = sprintf(
apply_filters( 'wpmu_signup_blog_notification_subject',
__( '[%1$s] Activate %2$s' ),
$domain, $path, $title, $user, $user_email, $key, $meta
),
$from_name,
esc_url( 'http://' . $domain . $path )
);
wp_mail($user_email, $subject, $message, $message_headers);
return true;
}
?>
Examples [ wp-snippets.com ]
Google Arama Sonuçlarý
- WPMU Functions/wpmu signup blog 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 - wpmu_signup_blog_notification Wordpress hook details -- Adam ...
WordPress hook directory wpmu_signup_blog_notification. WordPress version history for wpmu_signup_blog_notification. This database has information for all ...
adambrown.info - wpmu_signup_blog_notification (WordPress Function) - WPSeek.com
WordPress lookup for wpmu_signup_blog_notification, a WordPress Function. wpseek.com is a WordPress-centric search tool for developers and theme ...
wpseek.com - How to moderate signups – WordPress "Must-Use" Tutorials
Oct 5, 2007 ... Scroll down until you find the function wpmu_signup_blog_notification. Copy everything from $admin_email to just before the last } and paste it ...
wpmututorials.com