Skip to content

Commit 43d241f

Browse files
committed
Docs: Correct and improve the documentation for the update_option_new_admin_email() function and the new_admin_email_content filter.
See #41017 git-svn-id: https://develop.svn.wordpress.org/trunk@41208 602fd350-edb4-49c9-b593-d223f7449a82
1 parent 2adead7 commit 43d241f

1 file changed

Lines changed: 13 additions & 6 deletions

File tree

src/wp-admin/includes/ms.php

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -266,12 +266,14 @@ function wpmu_delete_user( $id ) {
266266
}
267267

268268
/**
269-
* Sends an email when a site administrator email address is changed.
269+
* Send a confirmation request email when a change of site admin email address is attempted.
270+
*
271+
* The new site admin address will not become active until confirmed.
270272
*
271273
* @since 3.0.0
272274
*
273-
* @param string $old_value The old email address. Not currently used.
274-
* @param string $value The new email address.
275+
* @param string $old_value The old site admin email address.
276+
* @param string $value The proposed new site admin email address.
275277
*/
276278
function update_option_new_admin_email( $old_value, $value ) {
277279
if ( $value == get_option( 'admin_email' ) || !is_email( $value ) )
@@ -305,19 +307,24 @@ function update_option_new_admin_email( $old_value, $value ) {
305307
###SITEURL###' );
306308

307309
/**
308-
* Filters the email text sent when the site admin email is changed.
310+
* Filters the text of the email sent when a change of site admin email address is attempted.
309311
*
310312
* The following strings have a special meaning and will get replaced dynamically:
311313
* ###USERNAME### The current user's username.
312314
* ###ADMIN_URL### The link to click on to confirm the email change.
313-
* ###EMAIL### The new email.
315+
* ###EMAIL### The proposed new site admin email address.
314316
* ###SITENAME### The name of the site.
315317
* ###SITEURL### The URL to the site.
316318
*
317319
* @since MU (3.0.0)
318320
*
319321
* @param string $email_text Text in the email.
320-
* @param string $new_admin_email New admin email that the current administration email was changed to.
322+
* @param array $new_admin_email {
323+
* Data relating to the new site admin email address.
324+
*
325+
* @type string $hash The secure hash used in the confirmation link URL.
326+
* @type string $newemail The proposed new site admin email address.
327+
* }
321328
*/
322329
$content = apply_filters( 'new_admin_email_content', $email_text, $new_admin_email );
323330

0 commit comments

Comments
 (0)