Switch language

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




newblog_notify_siteadmin [ WordPress Function ]

newblog_notify_siteadmin ( $blog_id, $deprecated = '' )
Parameters:
  • (int) $blog_id The new site's ID.
Returns:
  • (bool)
Defined at:



Notifies the network admin that a new site has been activated.

Filter 'newblog_notify_siteadmin' to change the content of the notification email.

Source


<?php
function newblog_notify_siteadmin$blog_id$deprecated '' ) {
    if ( 
get_site_option'registrationnotification' ) != 'yes' )
        return 
false;

    
$email get_site_option'admin_email' );
    if ( 
is_email($email) == false )
        return 
false;

    
$options_site_url esc_url(network_admin_url('settings.php'));

    
switch_to_blog$blog_id );
    
$blogname get_option'blogname' );
    
$siteurl site_url();
    
restore_current_blog();

    
$msg sprintf__'New Site: %1s
URL: %2s
Remote IP: %3s

Disable these notifications: %4s' 
), $blogname$siteurl$_SERVER['REMOTE_ADDR'], $options_site_url);
    
$msg apply_filters'newblog_notify_siteadmin'$msg );

    
wp_mail$emailsprintf__'New Site Registration: %s' ), $siteurl ), $msg );
    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