wp_installed_email
Filter HookDescription
Filters the contents of the email sent to the site administrator when WordPress is installed. }Hook Information
File Location |
wp-admin/includes/upgrade.php
View on GitHub
|
Hook Type | Filter |
Line Number | 638 |
Hook Parameters
Type | Name | Description |
---|---|---|
array
|
$installed_email
|
{ Used to build wp_mail(). |
WP_User
|
$user
|
The site administrator user object. |
string
|
$blog_title
|
The site title. |
string
|
$blog_url
|
The site URL. |
string
|
$password
|
The site administrator's password. Note that a placeholder message is usually passed instead of the user's actual password. |
Usage Examples
Basic Usage
<?php
// Hook into wp_installed_email
add_filter('wp_installed_email', 'my_custom_filter', 10, 5);
function my_custom_filter($installed_email, $user, $blog_title, $blog_url, $password) {
// Your custom filtering logic here
return $installed_email;
}
Source Code Context
wp-admin/includes/upgrade.php:638
- How this hook is used in WordPress core
<?php
633 * @param string $blog_title The site title.
634 * @param string $blog_url The site URL.
635 * @param string $password The site administrator's password. Note that a placeholder message
636 * is usually passed instead of the user's actual password.
637 */
638 $installed_email = apply_filters( 'wp_installed_email', $installed_email, $user, $blog_title, $blog_url, $password );
639
640 wp_mail(
641 $installed_email['to'],
642 $installed_email['subject'],
643 $installed_email['message'],
PHP Documentation
<?php
/**
* Filters the contents of the email sent to the site administrator when WordPress is installed.
*
* @since 5.6.0
*
* @param array $installed_email {
* Used to build wp_mail().
*
* @type string $to The email address of the recipient.
* @type string $subject The subject of the email.
* @type string $message The content of the email.
* @type string $headers Headers.
* }
* @param WP_User $user The site administrator user object.
* @param string $blog_title The site title.
* @param string $blog_url The site URL.
* @param string $password The site administrator's password. Note that a placeholder message
* is usually passed instead of the user's actual password.
*/
Quick Info
- Hook Type: Filter
- Parameters: 5
- File: wp-admin/includes/upgrade.php
Related Hooks
Related hooks will be displayed here in future updates.