Changeset 37276
- Timestamp:
- 04/21/2016 10:19:42 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/pluggable.php
r37030 r37276 1692 1692 * @since 4.3.0 The `$plaintext_pass` parameter was changed to `$notify`. 1693 1693 * @since 4.3.1 The `$plaintext_pass` parameter was deprecated. `$notify` added as a third parameter. 1694 * @since 4.6.0 The `$notify` parameter accepts 'user' for sending notification only to the user created. 1694 1695 * 1695 1696 * @global wpdb $wpdb WordPress database object for queries. … … 1699 1700 * @param null $deprecated Not used (argument deprecated). 1700 1701 * @param string $notify Optional. Type of notification that should happen. Accepts 'admin' or an empty 1701 * string (admin only), or 'both' (admin and user). Default empty.1702 * string (admin only), 'user', or 'both' (admin and user). Default empty. 1702 1703 */ 1703 1704 function wp_new_user_notification( $user_id, $deprecated = null, $notify = '' ) { … … 1713 1714 $blogname = wp_specialchars_decode(get_option('blogname'), ENT_QUOTES); 1714 1715 1715 $message = sprintf(__('New user registration on your site %s:'), $blogname) . "\r\n\r\n"; 1716 $message .= sprintf(__('Username: %s'), $user->user_login) . "\r\n\r\n"; 1717 $message .= sprintf(__('Email: %s'), $user->user_email) . "\r\n"; 1718 1719 @wp_mail(get_option('admin_email'), sprintf(__('[%s] New User Registration'), $blogname), $message); 1716 if ( 'user' !== $notify ) { 1717 $message = sprintf( __( 'New user registration on your site %s:' ), $blogname ) . "\r\n\r\n"; 1718 $message .= sprintf( __( 'Username: %s' ), $user->user_login ) . "\r\n\r\n"; 1719 $message .= sprintf( __( 'Email: %s' ), $user->user_email ) . "\r\n"; 1720 1721 @wp_mail( get_option( 'admin_email' ), sprintf( __( '[%s] New User Registration' ), $blogname ), $message ); 1722 } 1720 1723 1721 1724 // `$deprecated was pre-4.3 `$plaintext_pass`. An empty `$plaintext_pass` didn't sent a user notifcation.
Note: See TracChangeset
for help on using the changeset viewer.