summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorJohn Blackbourn <johnbillion@git.wordpress.org>2025-04-21 11:47:11 +0000
committerJohn Blackbourn <johnbillion@git.wordpress.org>2025-04-21 11:47:11 +0000
commita1bce5f880b7c7b125f92fa468c2adedd354ece5 (patch)
treedeead298cd0fd8f0e1114c3ef065257680d92ebb
parent0bf5949d0127c29dd483c1ebb859970682024a55 (diff)
downloadwordpress-a1bce5f880b7c7b125f92fa468c2adedd354ece5.tar.gz
wordpress-a1bce5f880b7c7b125f92fa468c2adedd354ece5.zip
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
-rw-r--r--src/wp-admin/includes/misc.php11
-rw-r--r--src/wp-admin/includes/privacy-tools.php11
-rw-r--r--src/wp-admin/ms-delete-site.php7
-rw-r--r--src/wp-includes/functions.php8
-rw-r--r--src/wp-includes/ms-functions.php19
-rw-r--r--src/wp-includes/user.php73
6 files changed, 70 insertions, 59 deletions
diff --git a/src/wp-admin/includes/misc.php b/src/wp-admin/includes/misc.php
index 61b69aafee..979d237448 100644
--- a/src/wp-admin/includes/misc.php
+++ b/src/wp-admin/includes/misc.php
@@ -1483,11 +1483,12 @@ All at ###SITENAME###
* Filters the text of the email sent when a change of site admin email address is attempted.
*
* The following strings have a special meaning and will get replaced dynamically:
- * - ###USERNAME### The current user's username.
- * - ###ADMIN_URL### The link to click on to confirm the email change.
- * - ###EMAIL### The proposed new site admin email address.
- * - ###SITENAME### The name of the site.
- * - ###SITEURL### The URL to the site.
+ *
+ * - `###USERNAME###` The current user's username.
+ * - `###ADMIN_URL###` The link to click on to confirm the email change.
+ * - `###EMAIL###` The proposed new site admin email address.
+ * - `###SITENAME###` The name of the site.
+ * - `###SITEURL###` The URL to the site.
*
* @since MU (3.0.0)
* @since 4.9.0 This filter is no longer Multisite specific.
diff --git a/src/wp-admin/includes/privacy-tools.php b/src/wp-admin/includes/privacy-tools.php
index c5d7c9a97f..d5853185eb 100644
--- a/src/wp-admin/includes/privacy-tools.php
+++ b/src/wp-admin/includes/privacy-tools.php
@@ -613,7 +613,7 @@ function wp_privacy_send_personal_data_export_email( $request_id ) {
/**
* Filters the recipient of the personal data export email notification.
- * Should be used with great caution to avoid sending the data export link to wrong emails.
+ * Should be used with great caution to avoid sending the data export link to the wrong email.
*
* @since 5.3.0
*
@@ -678,10 +678,11 @@ All at ###SITENAME###
* Filters the text of the email sent with a personal data export file.
*
* The following strings have a special meaning and will get replaced dynamically:
- * ###EXPIRATION### The date when the URL will be automatically deleted.
- * ###LINK### URL of the personal data export file for the user.
- * ###SITENAME### The name of the site.
- * ###SITEURL### The URL to the site.
+ *
+ * - `###EXPIRATION###` The date when the URL will be automatically deleted.
+ * - `###LINK###` URL of the personal data export file for the user.
+ * - `###SITENAME###` The name of the site.
+ * - `###SITEURL###` The URL to the site.
*
* @since 4.9.6
* @since 5.3.0 Introduced the `$email_data` array.
diff --git a/src/wp-admin/ms-delete-site.php b/src/wp-admin/ms-delete-site.php
index d98c3411fe..2f79549bcd 100644
--- a/src/wp-admin/ms-delete-site.php
+++ b/src/wp-admin/ms-delete-site.php
@@ -75,6 +75,13 @@ All at ###SITENAME###
/**
* Filters the text for the email sent to the site admin when a request to delete a site in a Multisite network is submitted.
*
+ * The following strings have a special meaning and will get replaced dynamically:
+ *
+ * - `###USERNAME###` The current user's username.
+ * - `###URL_DELETE###` The link to click on to confirm the site deletion.
+ * - `###SITENAME###` The name of the site.
+ * - `###SITEURL###` The URL to the site.
+ *
* @since 3.0.0
*
* @param string $content The email text.
diff --git a/src/wp-includes/functions.php b/src/wp-includes/functions.php
index 08f19287af..33b775e718 100644
--- a/src/wp-includes/functions.php
+++ b/src/wp-includes/functions.php
@@ -8180,10 +8180,10 @@ All at ###SITENAME###
* @type string $subject The subject of the email.
* @type string $message The content of the email.
* The following strings have a special meaning and will get replaced dynamically:
- * - ###OLD_EMAIL### The old site admin email address.
- * - ###NEW_EMAIL### The new site admin email address.
- * - ###SITENAME### The name of the site.
- * - ###SITEURL### The URL to the site.
+ * - `###OLD_EMAIL###` The old site admin email address.
+ * - `###NEW_EMAIL###` The new site admin email address.
+ * - `###SITENAME###` The name of the site.
+ * - `###SITEURL###` The URL to the site.
* @type string $headers Headers.
* }
* @param string $old_email The old site admin email address.
diff --git a/src/wp-includes/ms-functions.php b/src/wp-includes/ms-functions.php
index cbec24ab5e..d11a1ae643 100644
--- a/src/wp-includes/ms-functions.php
+++ b/src/wp-includes/ms-functions.php
@@ -2816,11 +2816,12 @@ All at ###SITENAME###
* Filters the text of the email sent when a change of network admin email address is attempted.
*
* The following strings have a special meaning and will get replaced dynamically:
- * ###USERNAME### The current user's username.
- * ###ADMIN_URL### The link to click on to confirm the email change.
- * ###EMAIL### The proposed new network admin email address.
- * ###SITENAME### The name of the network.
- * ###SITEURL### The URL to the network.
+ *
+ * - `###USERNAME###` The current user's username.
+ * - `###ADMIN_URL###` The link to click on to confirm the email change.
+ * - `###EMAIL###` The proposed new network admin email address.
+ * - `###SITENAME###` The name of the network.
+ * - `###SITEURL###` The URL to the network.
*
* @since 4.9.0
*
@@ -2927,10 +2928,10 @@ All at ###SITENAME###
* @type string $subject The subject of the email.
* @type string $message The content of the email.
* The following strings have a special meaning and will get replaced dynamically:
- * - ###OLD_EMAIL### The old network admin email address.
- * - ###NEW_EMAIL### The new network admin email address.
- * - ###SITENAME### The name of the network.
- * - ###SITEURL### The URL to the site.
+ * - `###OLD_EMAIL###` The old network admin email address.
+ * - `###NEW_EMAIL###` The new network admin email address.
+ * - `###SITENAME###` The name of the network.
+ * - `###SITEURL###` The URL to the site.
* @type string $headers Headers.
* }
* @param string $old_email The old network admin email address.
diff --git a/src/wp-includes/user.php b/src/wp-includes/user.php
index 8d4aab98c1..1e15b4b0ce 100644
--- a/src/wp-includes/user.php
+++ b/src/wp-includes/user.php
@@ -2758,11 +2758,11 @@ All at ###SITENAME###
* @type string $subject The subject of the email.
* @type string $message The content of the email.
* The following strings have a special meaning and will get replaced dynamically:
- * - ###USERNAME### The current user's username.
- * - ###ADMIN_EMAIL### The admin email in case this was unexpected.
- * - ###EMAIL### The user's email address.
- * - ###SITENAME### The name of the site.
- * - ###SITEURL### The URL to the site.
+ * - `###USERNAME###` The current user's username.
+ * - `###ADMIN_EMAIL###` The admin email in case this was unexpected.
+ * - `###EMAIL###` The user's email address.
+ * - `###SITENAME###` The name of the site.
+ * - `###SITEURL###` The URL to the site.
* @type string $headers Headers. Add headers in a newline (\r\n) separated string.
* }
* @param array $user The original user array.
@@ -2816,12 +2816,12 @@ All at ###SITENAME###
* @type string $subject The subject of the email.
* @type string $message The content of the email.
* The following strings have a special meaning and will get replaced dynamically:
- * - ###USERNAME### The current user's username.
- * - ###ADMIN_EMAIL### The admin email in case this was unexpected.
- * - ###NEW_EMAIL### The new email address.
- * - ###EMAIL### The old email address.
- * - ###SITENAME### The name of the site.
- * - ###SITEURL### The URL to the site.
+ * - `###USERNAME###` The current user's username.
+ * - `###ADMIN_EMAIL###` The admin email in case this was unexpected.
+ * - `###NEW_EMAIL###` The new email address.
+ * - `###EMAIL###` The old email address.
+ * - `###SITENAME###` The name of the site.
+ * - `###SITEURL###` The URL to the site.
* @type string $headers Headers.
* }
* @param array $user The original user array.
@@ -3839,11 +3839,12 @@ All at ###SITENAME###
* Filters the text of the email sent when a change of user email address is attempted.
*
* The following strings have a special meaning and will get replaced dynamically:
- * - ###USERNAME### The current user's username.
- * - ###ADMIN_URL### The link to click on to confirm the email change.
- * - ###EMAIL### The new email.
- * - ###SITENAME### The name of the site.
- * - ###SITEURL### The URL to the site.
+ *
+ * - `###USERNAME###` The current user's username.
+ * - `###ADMIN_URL###` The link to click on to confirm the email change.
+ * - `###EMAIL###` The new email.
+ * - `###SITENAME###` The name of the site.
+ * - `###SITEURL###` The URL to the site.
*
* @since MU (3.0.0)
* @since 4.9.0 This filter is no longer Multisite specific.
@@ -4268,11 +4269,11 @@ All at ###SITENAME###
*
* The following strings have a special meaning and will get replaced dynamically:
*
- * ###SITENAME### The name of the site.
- * ###USER_EMAIL### The user email for the request.
- * ###DESCRIPTION### Description of the action being performed so the user knows what the email is for.
- * ###MANAGE_URL### The URL to manage requests.
- * ###SITEURL### The URL to the site.
+ * - `###SITENAME###` The name of the site.
+ * - `###USER_EMAIL###` The user email for the request.
+ * - `###DESCRIPTION###` Description of the action being performed so the user knows what the email is for.
+ * - `###MANAGE_URL###` The URL to manage requests.
+ * - `###SITEURL###` The URL to the site.
*
* @since 4.9.6
* @deprecated 5.8.0 Use {@see 'user_request_confirmed_email_content'} instead.
@@ -4311,11 +4312,11 @@ All at ###SITENAME###
* The email is sent to an administrator when a user request is confirmed.
* The following strings have a special meaning and will get replaced dynamically:
*
- * ###SITENAME### The name of the site.
- * ###USER_EMAIL### The user email for the request.
- * ###DESCRIPTION### Description of the action being performed so the user knows what the email is for.
- * ###MANAGE_URL### The URL to manage requests.
- * ###SITEURL### The URL to the site.
+ * - `###SITENAME###` The name of the site.
+ * - `###USER_EMAIL###` The user email for the request.
+ * - `###DESCRIPTION###` Description of the action being performed so the user knows what the email is for.
+ * - `###MANAGE_URL###` The URL to manage requests.
+ * - `###SITEURL###` The URL to the site.
*
* @since 5.8.0
*
@@ -4511,9 +4512,9 @@ All at ###SITENAME###
*
* The following strings have a special meaning and will get replaced dynamically:
*
- * ###SITENAME### The name of the site.
- * ###PRIVACY_POLICY_URL### Privacy policy page URL.
- * ###SITEURL### The URL to the site.
+ * - `###SITENAME###` The name of the site.
+ * - `###PRIVACY_POLICY_URL###` Privacy policy page URL.
+ * - `###SITEURL###` The URL to the site.
*
* @since 4.9.6
* @deprecated 5.8.0 Use {@see 'user_erasure_fulfillment_email_content'} instead.
@@ -4553,9 +4554,9 @@ All at ###SITENAME###
*
* The following strings have a special meaning and will get replaced dynamically:
*
- * ###SITENAME### The name of the site.
- * ###PRIVACY_POLICY_URL### Privacy policy page URL.
- * ###SITEURL### The URL to the site.
+ * - `###SITENAME###` The name of the site.
+ * - `###PRIVACY_POLICY_URL###` Privacy policy page URL.
+ * - `###SITEURL###` The URL to the site.
*
* @since 5.8.0
*
@@ -4873,10 +4874,10 @@ All at ###SITENAME###
*
* The following strings have a special meaning and will get replaced dynamically:
*
- * ###DESCRIPTION### Description of the action being performed so the user knows what the email is for.
- * ###CONFIRM_URL### The link to click on to confirm the account action.
- * ###SITENAME### The name of the site.
- * ###SITEURL### The URL to the site.
+ * - `###DESCRIPTION###` Description of the action being performed so the user knows what the email is for.
+ * - `###CONFIRM_URL###` The link to click on to confirm the account action.
+ * - `###SITENAME###` The name of the site.
+ * - `###SITEURL###` The URL to the site.
*
* @since 4.9.6
*