398 | | @wp_mail($email, __('New WordPress Site'), $message); |
| 397 | $new_blog_email = array( |
| 398 | 'to' => $user->user_email, |
| 399 | /* translators: New site notification email subject. */ |
| 400 | 'subject' => __( 'New WordPress Site' ), |
| 401 | 'message' => $new_blog_text, |
| 402 | 'headers' => '', |
| 403 | ); |
| 404 | |
| 405 | /** |
| 406 | * Filters the contents of the email sent when the new blog is create. |
| 407 | * |
| 408 | * @since |
| 409 | * |
| 410 | * @param array $new_blog_email { |
| 411 | * Used to build wp_mail(). |
| 412 | * @type string $to The intended recipients. Add emails in a comma separated string. |
| 413 | * @type string $subject The subject of the email. |
| 414 | * @type string $message The content of the email. |
| 415 | * The following strings have a special meaning and will get replaced dynamically: |
| 416 | * - ###SITEURL### The URL of the new created site. |
| 417 | * - ###USERNAME### The site administrator's username. |
| 418 | * - ###PASSWORD### The site administrator's password. |
| 419 | * - ###LOGINURL### The Login URL of the site. |
| 420 | * @type string $headers Headers. Add headers in a newline (\r\n) separated string. |
| 421 | * } |
| 422 | * @param int $user_id User ID. |
| 423 | * @param string $blog_title Site title. |
| 424 | * @param string $blog_url Site url. |
| 425 | * @param string $password User's Password. |
| 426 | * |
| 427 | */ |
| 428 | $new_blog_email = apply_filters( 'new_blog_email', $new_blog_email, $blog_title, $blog_url, $user_id, $password ); |
| 429 | |
| 430 | $new_blog_email['message'] = str_replace( '###SITEURL###', $blog_url, $new_blog_email['message'] ); |
| 431 | $new_blog_email['message'] = str_replace( '###USERNAME###', $name, $new_blog_email['message'] ); |
| 432 | $new_blog_email['message'] = str_replace( '###PASSWORD###', $password, $new_blog_email['message'] ); |
| 433 | $new_blog_email['message'] = str_replace( '###LOGINURL###', $login_url, $new_blog_email['message'] ); |
| 434 | |
| 435 | wp_mail( $new_blog_email['to'], $new_blog_email['subject'], $new_blog_email['message'], $new_blog_email['headers'] ); |