Skip to content

Commit a1bce5f

Browse files
committed
Docs: Improve and standardise the format of placeholder strings that get replaced within email messages.
This prevents the strings being treated as h3 headings by the documentation parser on developer.wordpress.org. See #63166 git-svn-id: https://develop.svn.wordpress.org/trunk@60178 602fd350-edb4-49c9-b593-d223f7449a82
1 parent 0bf5949 commit a1bce5f

File tree

6 files changed

+70
-59
lines changed

6 files changed

+70
-59
lines changed

src/wp-admin/includes/misc.php

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1483,11 +1483,12 @@ function update_option_new_admin_email( $old_value, $value ) {
14831483
* Filters the text of the email sent when a change of site admin email address is attempted.
14841484
*
14851485
* The following strings have a special meaning and will get replaced dynamically:
1486-
* - ###USERNAME### The current user's username.
1487-
* - ###ADMIN_URL### The link to click on to confirm the email change.
1488-
* - ###EMAIL### The proposed new site admin email address.
1489-
* - ###SITENAME### The name of the site.
1490-
* - ###SITEURL### The URL to the site.
1486+
*
1487+
* - `###USERNAME###` The current user's username.
1488+
* - `###ADMIN_URL###` The link to click on to confirm the email change.
1489+
* - `###EMAIL###` The proposed new site admin email address.
1490+
* - `###SITENAME###` The name of the site.
1491+
* - `###SITEURL###` The URL to the site.
14911492
*
14921493
* @since MU (3.0.0)
14931494
* @since 4.9.0 This filter is no longer Multisite specific.

src/wp-admin/includes/privacy-tools.php

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -613,7 +613,7 @@ function wp_privacy_send_personal_data_export_email( $request_id ) {
613613

614614
/**
615615
* Filters the recipient of the personal data export email notification.
616-
* Should be used with great caution to avoid sending the data export link to wrong emails.
616+
* Should be used with great caution to avoid sending the data export link to the wrong email.
617617
*
618618
* @since 5.3.0
619619
*
@@ -678,10 +678,11 @@ function wp_privacy_send_personal_data_export_email( $request_id ) {
678678
* Filters the text of the email sent with a personal data export file.
679679
*
680680
* The following strings have a special meaning and will get replaced dynamically:
681-
* ###EXPIRATION### The date when the URL will be automatically deleted.
682-
* ###LINK### URL of the personal data export file for the user.
683-
* ###SITENAME### The name of the site.
684-
* ###SITEURL### The URL to the site.
681+
*
682+
* - `###EXPIRATION###` The date when the URL will be automatically deleted.
683+
* - `###LINK###` URL of the personal data export file for the user.
684+
* - `###SITENAME###` The name of the site.
685+
* - `###SITEURL###` The URL to the site.
685686
*
686687
* @since 4.9.6
687688
* @since 5.3.0 Introduced the `$email_data` array.

src/wp-admin/ms-delete-site.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,13 @@
7575
/**
7676
* Filters the text for the email sent to the site admin when a request to delete a site in a Multisite network is submitted.
7777
*
78+
* The following strings have a special meaning and will get replaced dynamically:
79+
*
80+
* - `###USERNAME###` The current user's username.
81+
* - `###URL_DELETE###` The link to click on to confirm the site deletion.
82+
* - `###SITENAME###` The name of the site.
83+
* - `###SITEURL###` The URL to the site.
84+
*
7885
* @since 3.0.0
7986
*
8087
* @param string $content The email text.

src/wp-includes/functions.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8180,10 +8180,10 @@ function wp_site_admin_email_change_notification( $old_email, $new_email, $optio
81808180
* @type string $subject The subject of the email.
81818181
* @type string $message The content of the email.
81828182
* The following strings have a special meaning and will get replaced dynamically:
8183-
* - ###OLD_EMAIL### The old site admin email address.
8184-
* - ###NEW_EMAIL### The new site admin email address.
8185-
* - ###SITENAME### The name of the site.
8186-
* - ###SITEURL### The URL to the site.
8183+
* - `###OLD_EMAIL###` The old site admin email address.
8184+
* - `###NEW_EMAIL###` The new site admin email address.
8185+
* - `###SITENAME###` The name of the site.
8186+
* - `###SITEURL###` The URL to the site.
81878187
* @type string $headers Headers.
81888188
* }
81898189
* @param string $old_email The old site admin email address.

src/wp-includes/ms-functions.php

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2816,11 +2816,12 @@ function update_network_option_new_admin_email( $old_value, $value ) {
28162816
* Filters the text of the email sent when a change of network admin email address is attempted.
28172817
*
28182818
* The following strings have a special meaning and will get replaced dynamically:
2819-
* ###USERNAME### The current user's username.
2820-
* ###ADMIN_URL### The link to click on to confirm the email change.
2821-
* ###EMAIL### The proposed new network admin email address.
2822-
* ###SITENAME### The name of the network.
2823-
* ###SITEURL### The URL to the network.
2819+
*
2820+
* - `###USERNAME###` The current user's username.
2821+
* - `###ADMIN_URL###` The link to click on to confirm the email change.
2822+
* - `###EMAIL###` The proposed new network admin email address.
2823+
* - `###SITENAME###` The name of the network.
2824+
* - `###SITEURL###` The URL to the network.
28242825
*
28252826
* @since 4.9.0
28262827
*
@@ -2927,10 +2928,10 @@ function wp_network_admin_email_change_notification( $option_name, $new_email, $
29272928
* @type string $subject The subject of the email.
29282929
* @type string $message The content of the email.
29292930
* The following strings have a special meaning and will get replaced dynamically:
2930-
* - ###OLD_EMAIL### The old network admin email address.
2931-
* - ###NEW_EMAIL### The new network admin email address.
2932-
* - ###SITENAME### The name of the network.
2933-
* - ###SITEURL### The URL to the site.
2931+
* - `###OLD_EMAIL###` The old network admin email address.
2932+
* - `###NEW_EMAIL###` The new network admin email address.
2933+
* - `###SITENAME###` The name of the network.
2934+
* - `###SITEURL###` The URL to the site.
29342935
* @type string $headers Headers.
29352936
* }
29362937
* @param string $old_email The old network admin email address.

src/wp-includes/user.php

Lines changed: 37 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -2758,11 +2758,11 @@ function wp_update_user( $userdata ) {
27582758
* @type string $subject The subject of the email.
27592759
* @type string $message The content of the email.
27602760
* The following strings have a special meaning and will get replaced dynamically:
2761-
* - ###USERNAME### The current user's username.
2762-
* - ###ADMIN_EMAIL### The admin email in case this was unexpected.
2763-
* - ###EMAIL### The user's email address.
2764-
* - ###SITENAME### The name of the site.
2765-
* - ###SITEURL### The URL to the site.
2761+
* - `###USERNAME###` The current user's username.
2762+
* - `###ADMIN_EMAIL###` The admin email in case this was unexpected.
2763+
* - `###EMAIL###` The user's email address.
2764+
* - `###SITENAME###` The name of the site.
2765+
* - `###SITEURL###` The URL to the site.
27662766
* @type string $headers Headers. Add headers in a newline (\r\n) separated string.
27672767
* }
27682768
* @param array $user The original user array.
@@ -2816,12 +2816,12 @@ function wp_update_user( $userdata ) {
28162816
* @type string $subject The subject of the email.
28172817
* @type string $message The content of the email.
28182818
* The following strings have a special meaning and will get replaced dynamically:
2819-
* - ###USERNAME### The current user's username.
2820-
* - ###ADMIN_EMAIL### The admin email in case this was unexpected.
2821-
* - ###NEW_EMAIL### The new email address.
2822-
* - ###EMAIL### The old email address.
2823-
* - ###SITENAME### The name of the site.
2824-
* - ###SITEURL### The URL to the site.
2819+
* - `###USERNAME###` The current user's username.
2820+
* - `###ADMIN_EMAIL###` The admin email in case this was unexpected.
2821+
* - `###NEW_EMAIL###` The new email address.
2822+
* - `###EMAIL###` The old email address.
2823+
* - `###SITENAME###` The name of the site.
2824+
* - `###SITEURL###` The URL to the site.
28252825
* @type string $headers Headers.
28262826
* }
28272827
* @param array $user The original user array.
@@ -3839,11 +3839,12 @@ function send_confirmation_on_profile_email() {
38393839
* Filters the text of the email sent when a change of user email address is attempted.
38403840
*
38413841
* The following strings have a special meaning and will get replaced dynamically:
3842-
* - ###USERNAME### The current user's username.
3843-
* - ###ADMIN_URL### The link to click on to confirm the email change.
3844-
* - ###EMAIL### The new email.
3845-
* - ###SITENAME### The name of the site.
3846-
* - ###SITEURL### The URL to the site.
3842+
*
3843+
* - `###USERNAME###` The current user's username.
3844+
* - `###ADMIN_URL###` The link to click on to confirm the email change.
3845+
* - `###EMAIL###` The new email.
3846+
* - `###SITENAME###` The name of the site.
3847+
* - `###SITEURL###` The URL to the site.
38473848
*
38483849
* @since MU (3.0.0)
38493850
* @since 4.9.0 This filter is no longer Multisite specific.
@@ -4268,11 +4269,11 @@ function _wp_privacy_send_request_confirmation_notification( $request_id ) {
42684269
*
42694270
* The following strings have a special meaning and will get replaced dynamically:
42704271
*
4271-
* ###SITENAME### The name of the site.
4272-
* ###USER_EMAIL### The user email for the request.
4273-
* ###DESCRIPTION### Description of the action being performed so the user knows what the email is for.
4274-
* ###MANAGE_URL### The URL to manage requests.
4275-
* ###SITEURL### The URL to the site.
4272+
* - `###SITENAME###` The name of the site.
4273+
* - `###USER_EMAIL###` The user email for the request.
4274+
* - `###DESCRIPTION###` Description of the action being performed so the user knows what the email is for.
4275+
* - `###MANAGE_URL###` The URL to manage requests.
4276+
* - `###SITEURL###` The URL to the site.
42764277
*
42774278
* @since 4.9.6
42784279
* @deprecated 5.8.0 Use {@see 'user_request_confirmed_email_content'} instead.
@@ -4311,11 +4312,11 @@ function _wp_privacy_send_request_confirmation_notification( $request_id ) {
43114312
* The email is sent to an administrator when a user request is confirmed.
43124313
* The following strings have a special meaning and will get replaced dynamically:
43134314
*
4314-
* ###SITENAME### The name of the site.
4315-
* ###USER_EMAIL### The user email for the request.
4316-
* ###DESCRIPTION### Description of the action being performed so the user knows what the email is for.
4317-
* ###MANAGE_URL### The URL to manage requests.
4318-
* ###SITEURL### The URL to the site.
4315+
* - `###SITENAME###` The name of the site.
4316+
* - `###USER_EMAIL###` The user email for the request.
4317+
* - `###DESCRIPTION###` Description of the action being performed so the user knows what the email is for.
4318+
* - `###MANAGE_URL###` The URL to manage requests.
4319+
* - `###SITEURL###` The URL to the site.
43194320
*
43204321
* @since 5.8.0
43214322
*
@@ -4511,9 +4512,9 @@ function _wp_privacy_send_erasure_fulfillment_notification( $request_id ) {
45114512
*
45124513
* The following strings have a special meaning and will get replaced dynamically:
45134514
*
4514-
* ###SITENAME### The name of the site.
4515-
* ###PRIVACY_POLICY_URL### Privacy policy page URL.
4516-
* ###SITEURL### The URL to the site.
4515+
* - `###SITENAME###` The name of the site.
4516+
* - `###PRIVACY_POLICY_URL###` Privacy policy page URL.
4517+
* - `###SITEURL###` The URL to the site.
45174518
*
45184519
* @since 4.9.6
45194520
* @deprecated 5.8.0 Use {@see 'user_erasure_fulfillment_email_content'} instead.
@@ -4553,9 +4554,9 @@ function _wp_privacy_send_erasure_fulfillment_notification( $request_id ) {
45534554
*
45544555
* The following strings have a special meaning and will get replaced dynamically:
45554556
*
4556-
* ###SITENAME### The name of the site.
4557-
* ###PRIVACY_POLICY_URL### Privacy policy page URL.
4558-
* ###SITEURL### The URL to the site.
4557+
* - `###SITENAME###` The name of the site.
4558+
* - `###PRIVACY_POLICY_URL###` Privacy policy page URL.
4559+
* - `###SITEURL###` The URL to the site.
45594560
*
45604561
* @since 5.8.0
45614562
*
@@ -4873,10 +4874,10 @@ function wp_send_user_request( $request_id ) {
48734874
*
48744875
* The following strings have a special meaning and will get replaced dynamically:
48754876
*
4876-
* ###DESCRIPTION### Description of the action being performed so the user knows what the email is for.
4877-
* ###CONFIRM_URL### The link to click on to confirm the account action.
4878-
* ###SITENAME### The name of the site.
4879-
* ###SITEURL### The URL to the site.
4877+
* - `###DESCRIPTION###` Description of the action being performed so the user knows what the email is for.
4878+
* - `###CONFIRM_URL###` The link to click on to confirm the account action.
4879+
* - `###SITENAME###` The name of the site.
4880+
* - `###SITEURL###` The URL to the site.
48804881
*
48814882
* @since 4.9.6
48824883
*

0 commit comments

Comments
 (0)