Changeset 38961 for trunk/src/wp-includes/pluggable.php
- Timestamp:
- 10/26/2016 03:35:58 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/pluggable.php
r38470 r38961 212 212 if ( ! ( $phpmailer instanceof PHPMailer ) ) { 213 213 require_once ABSPATH . WPINC . '/class-phpmailer.php'; 214 require_once ABSPATH . WPINC . '/class-smtp.php'; 214 require_once ABSPATH . WPINC . '/class-smtp.php'; 215 215 $phpmailer = new PHPMailer( true ); 216 216 } … … 1418 1418 $emails = array_flip( $emails ); 1419 1419 } 1420 1421 $switched_locale = switch_to_locale( get_locale() ); 1420 1422 1421 1423 $comment_author_domain = @gethostbyaddr($comment->comment_author_IP); … … 1523 1525 } 1524 1526 1527 if ( $switched_locale ) { 1528 restore_previous_locale(); 1529 } 1530 1525 1531 return true; 1526 1532 } … … 1569 1575 $emails[] = $user->user_email; 1570 1576 } 1577 1578 $switched_locale = switch_to_locale( get_locale() ); 1571 1579 1572 1580 $comment_author_domain = @gethostbyaddr($comment->comment_author_IP); … … 1665 1673 } 1666 1674 1675 if ( $switched_locale ) { 1676 restore_previous_locale(); 1677 } 1678 1667 1679 return true; 1668 1680 } … … 1724 1736 1725 1737 if ( 'user' !== $notify ) { 1738 $switched_locale = switch_to_locale( get_locale() ); 1726 1739 $message = sprintf( __( 'New user registration on your site %s:' ), $blogname ) . "\r\n\r\n"; 1727 1740 $message .= sprintf( __( 'Username: %s' ), $user->user_login ) . "\r\n\r\n"; … … 1729 1742 1730 1743 @wp_mail( get_option( 'admin_email' ), sprintf( __( '[%s] New User Registration' ), $blogname ), $message ); 1744 1745 if ( $switched_locale ) { 1746 restore_previous_locale(); 1747 } 1731 1748 } 1732 1749 … … 1749 1766 $wpdb->update( $wpdb->users, array( 'user_activation_key' => $hashed ), array( 'user_login' => $user->user_login ) ); 1750 1767 1768 $switched_locale = switch_to_locale( get_user_locale( $user ) ); 1769 1751 1770 $message = sprintf(__('Username: %s'), $user->user_login) . "\r\n\r\n"; 1752 1771 $message .= __('To set your password, visit the following address:') . "\r\n\r\n"; … … 1756 1775 1757 1776 wp_mail($user->user_email, sprintf(__('[%s] Your username and password info'), $blogname), $message); 1777 1778 if ( $switched_locale ) { 1779 restore_previous_locale(); 1780 } 1758 1781 } 1759 1782 endif;
Note: See TracChangeset
for help on using the changeset viewer.