update_option_new_admin_email [ WordPress Function ]
update_option_new_admin_email ( $old_value, $value )
| Defined at: |
|
Benzer Fonksiyonlar: update_option, update_blog_details, update_post_meta, update_right_now_message, send_frame_options_header
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( $value. time() .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_url( admin_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( $value, sprintf( __( '[%s] New Admin Email Address' ), get_option( 'blogname' ) ), $content );
}
?>
Examples [ wp-snippets.com ]
Google Arama Sonuçlarý
- Function Reference/update option new admin email « WordPress ...
update_option_new_admin_email() is located in wp-admin/includes/ms.php . See also index of Function Reference and index of Template Tags. This page is ...
codex.wordpress.org - PHPXRef 0.7 : WordPress : /wp-admin/includes/ms.php source
... 173 174 return true; 175 } 176 177 function update_option_new_admin_email( $old_value, $value ) { 178 $email = get_option( 'admin_email' ); 179 if ( $value ...
phpxref.ftwr.co.uk - /wp-admin/includes/ms.php source - PHP Cross Reference ...
Jun 1, 2011 ... 0 ) 204 restore_current_blog(); 205 206 return $blog_allowed_themes; 207 } 208 209 function update_option_new_admin_email( $old_value, ...
xref.yoast.com - wordpress.vim - Kloppmagic.ca
May 22, 2011... show_post_thumbnail_warning site_admin_notice sync_category_tag_slugs update_option_new_admin_email update_user_status ...
www.kloppmagic.ca