Switch language

wpseek.com
A WordPress-centric search engine for devs and theme authors




wpmu_signup_blog_notification [ WordPress Function ]

wpmu_signup_blog_notification ( $domain, $path, $title, $user, $user_email, $key, $meta = '' )
Parameters:
  • (string) $domain The new blog domain.
  • (string) $path The new blog path.
  • (string) $title The site title.
  • (string) $user The user's login name.
  • (string) $user_email The user's email address.
  • (array) $meta By default, contains the requested privacy setting and lang_id.
  • (string) $key The activation key created in wpmu_signup_blog()
Returns:
  • (bool)
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 != )
        
$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_htmlget_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ý

Dahasý ...

Kullanýcý Tartýþmalarý [ wordpress.org ]

- Bulunamadý -

Yeni bir konu yaz ...

0 User Note(s)

Henüz yok. Ýlk sen ol!

Yeni Ekle ...



HTML5 Powered with CSS3 / Styling, Performance & Integration, and Semantics