Switch language

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




update_option_new_admin_email [ WordPress Function ]

update_option_new_admin_email ( $old_value, $value )
Defined at:



No description yet.

Source


<?php
function update_option_new_admin_email$old_value$value ) {
    
$email get_option'admin_email' );
    if ( 
$value == get_option'admin_email' ) || !is_email$value ) )
        return;

    
$hash md5$valuetime() .mt_rand() );
    
$new_admin_email = array(
        
'hash' => $hash,
        
'newemail' => $value
    
);
    
update_option'adminhash'$new_admin_email );

    
$content apply_filters'new_admin_email_content'__"Dear user,

You recently requested to have the administration email address on
your site changed.
If this is correct, please click on the following link to change it:
###ADMIN_URL###

You can safely ignore and delete this email if you do not want to
take this action.

This email has been sent to ###EMAIL###

Regards,
All at ###SITENAME###
###SITEURL### "
), $new_admin_email );

    
$content str_replace'###ADMIN_URL###'esc_urladmin_url'options.php?adminhash='.$hash ) ), $content );
    
$content str_replace'###EMAIL###'$value$content );
    
$content str_replace'###SITENAME###'get_site_option'site_name' ), $content );
    
$content str_replace'###SITEURL###'network_home_url(), $content );

    
wp_mail$valuesprintf__'[%s] New Admin Email Address' ), get_option'blogname' ) ), $content );
}
?>

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