Make WordPress Core

Changeset 57283

Timestamp:
01/14/2024 10:59:48 AM (7 months ago)
Author:
audrasjb
Message:

Administration: Introduce new_admin_email_subject filter.

This changeset introduces the new_admin_email_subject hook which allow developers to filter the subject of the email sent when a change of site admin email address is attempted.

Props MadtownLems, johnbillion, alexanderkoledov, shooper, Marc_J, nikmeyer, xlthlx, devmuhib, nuhel, audrasjb.
Fixes #59250.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/misc.php

    r56654 r57283  
    15321532    }
    15331533
    1534     wp_mail(
    1535         $value,
    1536         sprintf(
    1537             /* translators: New admin email address notification email subject. %s: Site title. */
    1538             __( '[%s] New Admin Email Address' ),
    1539             $site_title
    1540         ),
    1541         $content
     1534    $subject = sprintf(
     1535        /* translators: New admin email address notification email subject. %s: Site title. */
     1536        __( '[%s] New Admin Email Address' ),
     1537        $site_title
    15421538    );
     1539
     1540
     1541
     1542
     1543
     1544
     1545
     1546
     1547
     1548
     1549
    15431550
    15441551    if ( $switched_locale ) {
  • trunk/tests/phpunit/tests/admin/includesMisc.php

    r51994 r57283  
    2828        }
    2929    }
     30
     31
     32
     33
     34
     35
     36
     37
     38
     39
     40
     41
     42
     43
     44
     45
     46
     47
     48
     49
     50
     51
     52
     53
     54
     55
    3056}
Note: See TracChangeset for help on using the changeset viewer.