Make WordPress Core

Changeset 51411 for branches/5.8


Ignore:
Timestamp:
07/13/2021 12:06:51 AM (5 years ago)
Author:
desrosj
Message:

Docs: Various documentation fixes following [51129].

  • Typo corrections in filter descriptions.
  • DocBlocks are now now wrapped to the next line after 80 characters, and not extending beyond 120 total characters wide.
  • Remove unnecessary repeated references to the suggested replacement hooks.
  • Adjustments to the indentation for consistency with other emails in Core, allowing the phpcs:ignore comment to be removed.

Props SergeyBiryukov.
Merges [51410] to the 5.8 branch.
Fixes #44314.

Location:
branches/5.8
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/5.8

  • branches/5.8/src/wp-includes/user.php

    r51354 r51411  
    36773677        /* translators: Do not translate SITENAME, USER_EMAIL, DESCRIPTION, MANAGE_URL, SITEURL; those are placeholders. */
    36783678        $content = __(
    3679 // phpcs:ignore Generic.WhiteSpace.ScopeIndent.Incorrect, PEAR.Functions.FunctionCallSignature.Indent
    3680 'Howdy,
     3679                'Howdy,
    36813680
    36823681A user data privacy request has been confirmed on ###SITENAME###:
     
    36973696         * Filters the body of the user request confirmation email.
    36983697         *
    3699          * Use {@see 'user_request_confirmed_email_content'} instead.
    3700          *
    3701          * The email is sent to an administrator when an user request is confirmed.
     3698         * The email is sent to an administrator when a user request is confirmed.
    37023699         *
    37033700         * The following strings have a special meaning and will get replaced dynamically:
     
    37093706         * ###SITEURL###     The URL to the site.
    37103707         *
    3711          * For fulfillment email content use {@see 'user_erasure_fulfillment_email_content'} instead.
    3712          *
    37133708         * @since 4.9.6
    3714          *
    3715          * @deprecated 5.8.0 Use {@see 'user_request_confirmed_email_content'} instead. For fulfillment email content use {@see 'user_erasure_fulfillment_email_content'} instead.
     3709         * @deprecated 5.8.0 Use {@see 'user_request_confirmed_email_content'} instead.
     3710         *                   For user erasure fulfillment email content
     3711         *                   use {@see 'user_erasure_fulfillment_email_content'} instead.
     3712         *
     3713         * @param string $content    The email content.
     3714         * @param array  $email_data {
     3715         *     Data relating to the account action email.
     3716         *
     3717         *     @type WP_User_Request $request     User request object.
     3718         *     @type string          $user_email  The email address confirming a request
     3719         *     @type string          $description Description of the action being performed
     3720         *                                        so the user knows what the email is for.
     3721         *     @type string          $manage_url  The link to click manage privacy requests of this type.
     3722         *     @type string          $sitename    The site name sending the mail.
     3723         *     @type string          $siteurl     The site URL sending the mail.
     3724         *     @type string          $admin_email The administrator email receiving the mail.
     3725         * }
     3726         */
     3727        $content = apply_filters_deprecated(
     3728                'user_confirmed_action_email_content',
     3729                array( $content, $email_data ),
     3730                '5.8.0',
     3731                sprintf(
     3732                        /* translators: 1 & 2: Deprecation replacement options. */
     3733                        __( '%1$s or %2$s' ),
     3734                        'user_request_confirmed_email_content',
     3735                        'user_erasure_fulfillment_email_content'
     3736                )
     3737        );
     3738
     3739        /**
     3740         * Filters the body of the user request confirmation email.
     3741         *
     3742         * The email is sent to an administrator when a user request is confirmed.
     3743         * The following strings have a special meaning and will get replaced dynamically:
     3744         *
     3745         * ###SITENAME###    The name of the site.
     3746         * ###USER_EMAIL###  The user email for the request.
     3747         * ###DESCRIPTION### Description of the action being performed so the user knows what the email is for.
     3748         * ###MANAGE_URL###  The URL to manage requests.
     3749         * ###SITEURL###     The URL to the site.
     3750         *
     3751         * @since 5.8.0
    37163752         *
    37173753         * @param string $content    The email content.
     
    37283764         * }
    37293765         */
    3730         $content = apply_filters_deprecated(
    3731                 'user_confirmed_action_email_content',
    3732                 array( $content, $email_data ),
    3733                 '5.8.0',
    3734                 sprintf(
    3735                         /* translators: 1 & 2: Deprecation replacement options */
    3736                         __( '%1$s or %2$s' ),
    3737                         'user_request_confirmed_email_content',
    3738                         'user_erasure_fulfillment_email_content'
    3739                 )
    3740         );
    3741 
    3742         /**
    3743          * Filters the body of the user request confirmation email.
    3744          *
    3745          * The email is sent to an administrator when an user request is confirmed.
    3746          * The following strings have a special meaning and will get replaced dynamically:
    3747          *
    3748          * ###SITENAME###    The name of the site.
    3749          * ###USER_EMAIL###  The user email for the request.
    3750          * ###DESCRIPTION### Description of the action being performed so the user knows what the email is for.
    3751          * ###MANAGE_URL###  The URL to manage requests.
    3752          * ###SITEURL###     The URL to the site.
    3753          *
    3754          * @since 5.8.0
    3755          *
    3756          * @param string $content    The email content.
    3757          * @param array  $email_data {
     3766        $content = apply_filters( 'user_request_confirmed_email_content', $content, $email_data );
     3767
     3768        $content = str_replace( '###SITENAME###', $email_data['sitename'], $content );
     3769        $content = str_replace( '###USER_EMAIL###', $email_data['user_email'], $content );
     3770        $content = str_replace( '###DESCRIPTION###', $email_data['description'], $content );
     3771        $content = str_replace( '###MANAGE_URL###', esc_url_raw( $email_data['manage_url'] ), $content );
     3772        $content = str_replace( '###SITEURL###', esc_url_raw( $email_data['siteurl'] ), $content );
     3773
     3774        $headers = '';
     3775
     3776        /**
     3777         * Filters the headers of the user request confirmation email.
     3778         *
     3779         * @since 5.4.0
     3780         *
     3781         * @param string|array $headers    The email headers.
     3782         * @param string       $subject    The email subject.
     3783         * @param string       $content    The email content.
     3784         * @param int          $request_id The request ID.
     3785         * @param array        $email_data {
    37583786         *     Data relating to the account action email.
    37593787         *
     
    37673795         * }
    37683796         */
    3769         $content = apply_filters( 'user_request_confirmed_email_content', $content, $email_data );
    3770 
    3771         $content = str_replace( '###SITENAME###', $email_data['sitename'], $content );
    3772         $content = str_replace( '###USER_EMAIL###', $email_data['user_email'], $content );
    3773         $content = str_replace( '###DESCRIPTION###', $email_data['description'], $content );
    3774         $content = str_replace( '###MANAGE_URL###', esc_url_raw( $email_data['manage_url'] ), $content );
    3775         $content = str_replace( '###SITEURL###', esc_url_raw( $email_data['siteurl'] ), $content );
    3776 
    3777         $headers = '';
    3778 
    3779         /**
    3780          * Filters the headers of the user request confirmation email.
    3781          *
    3782          * @since 5.4.0
    3783          *
    3784          * @param string|array $headers    The email headers.
    3785          * @param string       $subject    The email subject.
    3786          * @param string       $content    The email content.
    3787          * @param int          $request_id The request ID.
    3788          * @param array        $email_data {
    3789          *     Data relating to the account action email.
    3790          *
    3791          *     @type WP_User_Request $request     User request object.
    3792          *     @type string          $user_email  The email address confirming a request
    3793          *     @type string          $description Description of the action being performed so the user knows what the email is for.
    3794          *     @type string          $manage_url  The link to click manage privacy requests of this type.
    3795          *     @type string          $sitename    The site name sending the mail.
    3796          *     @type string          $siteurl     The site URL sending the mail.
    3797          *     @type string          $admin_email The administrator email receiving the mail.
    3798          * }
    3799          */
    38003797        $headers = apply_filters( 'user_request_confirmed_email_headers', $headers, $subject, $content, $request_id, $email_data );
    38013798
     
    38653862         * Filters the subject of the email sent when an erasure request is completed.
    38663863         *
    3867          * Use {@see 'user_erasure_fulfillment_email_subject'} instead.
    3868          *
    38693864         * @since 4.9.8
    3870          *
    38713865         * @deprecated 5.8.0 Use {@see 'user_erasure_fulfillment_email_subject'} instead.
    38723866         *
     
    38853879         * }
    38863880         */
    3887         $subject = apply_filters_deprecated( 'user_erasure_complete_email_subject', array( $subject, $email_data['sitename'], $email_data ), '5.8.0', 'user_erasure_fulfillment_email_subject' );
     3881        $subject = apply_filters_deprecated(
     3882                'user_erasure_complete_email_subject',
     3883                array( $subject, $email_data['sitename'], $email_data ),
     3884                '5.8.0',
     3885                'user_erasure_fulfillment_email_subject'
     3886        );
    38883887
    38893888        /**
     
    39103909        /* translators: Do not translate SITENAME, SITEURL; those are placeholders. */
    39113910        $content = __(
    3912 // phpcs:ignore Generic.WhiteSpace.ScopeIndent.Incorrect, PEAR.Functions.FunctionCallSignature.Indent
    3913 'Howdy,
     3911                'Howdy,
    39143912
    39153913Your request to erase your personal data on ###SITENAME### has been completed.
     
    39253923                /* translators: Do not translate SITENAME, SITEURL, PRIVACY_POLICY_URL; those are placeholders. */
    39263924                $content = __(
    3927 // phpcs:ignore Generic.WhiteSpace.ScopeIndent.Incorrect, PEAR.Functions.FunctionCallSignature.Indent
    3928 'Howdy,
     3925                        'Howdy,
    39293926
    39303927Your request to erase your personal data on ###SITENAME### has been completed.
     
    39433940         * Filters the body of the data erasure fulfillment notification.
    39443941         *
    3945          * Use {@see 'user_erasure_fulfillment_email_content'} instead.
    3946          *
    3947          * The email is sent to a user when a their data erasure request is fulfilled
     3942         * The email is sent to a user when their data erasure request is fulfilled
    39483943         * by an administrator.
    39493944         *
     
    39543949         * ###SITEURL###            The URL to the site.
    39553950         *
    3956          * For user request confirmation email content use {@see 'user_request_confirmed_email_content'} instead.
    3957          *
    39583951         * @since 4.9.6
    3959          *
    3960          * @deprecated 5.8.0 Use {@see 'user_erasure_fulfillment_email_content'} instead. For user request confirmation email content use {@see 'user_request_confirmed_email_content'} instead.
     3952         * @deprecated 5.8.0 Use {@see 'user_erasure_fulfillment_email_content'} instead.
     3953         *                   For user request confirmation email content
     3954         *                   use {@see 'user_request_confirmed_email_content'} instead.
    39613955         *
    39623956         * @param string $content The email content.
     
    39783972                '5.8.0',
    39793973                sprintf(
    3980                         /* translators: 1 & 2: Deprecation replacement options */
     3974                        /* translators: 1 & 2: Deprecation replacement options. */
    39813975                        __( '%1$s or %2$s' ),
    39823976                        'user_erasure_fulfillment_email_content',
     
    39883982         * Filters the body of the data erasure fulfillment notification.
    39893983         *
    3990          * The email is sent to a user when a their data erasure request is fulfilled
     3984         * The email is sent to a user when their data erasure request is fulfilled
    39913985         * by an administrator.
    39923986         *
     
    40234017         * Filters the headers of the data erasure fulfillment notification.
    40244018         *
    4025          * Use {@see 'user_erasure_fulfillment_email_headers'} instead.
    4026          *
    40274019         * @since 5.4.0
    4028          *
    40294020         * @deprecated 5.8.0 Use {@see 'user_erasure_fulfillment_email_headers'} instead.
    40304021         *
     
    40454036         * }
    40464037         */
    4047         $headers = apply_filters_deprecated( 'user_erasure_complete_email_headers', array( $headers, $subject, $content, $request_id, $email_data ), '5.8.0', 'user_erasure_fulfillment_email_headers' );
     4038        $headers = apply_filters_deprecated(
     4039                'user_erasure_complete_email_headers',
     4040                array( $headers, $subject, $content, $request_id, $email_data ),
     4041                '5.8.0',
     4042                'user_erasure_fulfillment_email_headers'
     4043        );
    40484044
    40494045        /**
     
    42914287        /* translators: Do not translate DESCRIPTION, CONFIRM_URL, SITENAME, SITEURL: those are placeholders. */
    42924288        $content = __(
    4293 // phpcs:ignore Generic.WhiteSpace.ScopeIndent.Incorrect, PEAR.Functions.FunctionCallSignature.Indent
    4294 'Howdy,
     4289                'Howdy,
    42954290
    42964291A request has been made to perform the following action on your account:
Note: See TracChangeset for help on using the changeset viewer.