Make WordPress Core

Changeset 53301


Ignore:
Timestamp:
04/28/2022 09:52:56 AM (2 years ago)
Author:
johnbillion
Message:

Mail: Improve the docblocks for actions and functions related to the parsing of authentication cookies.

See #54729

File:
1 edited

Legend:

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

    r53299 r53301  
    549549
    550550            /**
    551              * Fires after PHPMailer has successfully sent a mail.
    552              *
    553              * The firing of this action does not necessarily mean that the recipient received the
     551             * Fires after PHPMailer has successfully sent an email.
     552             *
     553             * The firing of this action does not necessarily mean that the recipient(s) received the
    554554             * email successfully. It only means that the `send` method above was able to
    555555             * process the request without any errors.
     
    557557             * @since 5.9.0
    558558             *
    559              * @param array $mail_data An array containing the mail recipient, subject, message, headers, and attachments.
     559             * @param array $mail_data {
     560             *     An array containing the email recipient(s), subject, message, headers, and attachments.
     561             *
     562             *     @type string[] $to          Email addresses to send message.
     563             *     @type string   $subject     Email subject.
     564             *     @type string   $message     Message contents.
     565             *     @type string[] $headers     Additional headers.
     566             *     @type string[] $attachments Paths to files to attach.
     567             * }
    560568             */
    561569            do_action( 'wp_mail_succeeded', $mail_data );
     
    718726             * @since 2.7.0
    719727             *
    720              * @param string[] $cookie_elements An array of data for the authentication cookie.
     728             * @param string[] $cookie_elements {
     729             *     Authentication cookie components. None of the components should be assumed
     730             *     to be valid as they come directly from a client-provided cookie value.
     731             *
     732             *     @type string $username   User's username.
     733             *     @type string $expiration The time the cookie expires as a UNIX timestamp.
     734             *     @type string $token      User's session token used.
     735             *     @type string $hmac       The security hash for the cookie.
     736             *     @type string $scheme     The cookie scheme to use.
     737             * }
    721738             */
    722739            do_action( 'auth_cookie_expired', $cookie_elements );
     
    731748             * @since 2.7.0
    732749             *
    733              * @param string[] $cookie_elements An array of data for the authentication cookie.
     750             * @param string[] $cookie_elements {
     751             *     Authentication cookie components. None of the components should be assumed
     752             *     to be valid as they come directly from a client-provided cookie value.
     753             *
     754             *     @type string $username   User's username.
     755             *     @type string $expiration The time the cookie expires as a UNIX timestamp.
     756             *     @type string $token      User's session token used.
     757             *     @type string $hmac       The security hash for the cookie.
     758             *     @type string $scheme     The cookie scheme to use.
     759             * }
    734760             */
    735761            do_action( 'auth_cookie_bad_username', $cookie_elements );
     
    751777             * @since 2.7.0
    752778             *
    753              * @param string[] $cookie_elements An array of data for the authentication cookie.
     779             * @param string[] $cookie_elements {
     780             *     Authentication cookie components. None of the components should be assumed
     781             *     to be valid as they come directly from a client-provided cookie value.
     782             *
     783             *     @type string $username   User's username.
     784             *     @type string $expiration The time the cookie expires as a UNIX timestamp.
     785             *     @type string $token      User's session token used.
     786             *     @type string $hmac       The security hash for the cookie.
     787             *     @type string $scheme     The cookie scheme to use.
     788             * }
    754789             */
    755790            do_action( 'auth_cookie_bad_hash', $cookie_elements );
     
    764799             * @since 4.0.0
    765800             *
    766              * @param string[] $cookie_elements An array of data for the authentication cookie.
     801             * @param string[] $cookie_elements {
     802             *     Authentication cookie components. None of the components should be assumed
     803             *     to be valid as they come directly from a client-provided cookie value.
     804             *
     805             *     @type string $username   User's username.
     806             *     @type string $expiration The time the cookie expires as a UNIX timestamp.
     807             *     @type string $token      User's session token used.
     808             *     @type string $hmac       The security hash for the cookie.
     809             *     @type string $scheme     The cookie scheme to use.
     810             * }
    767811             */
    768812            do_action( 'auth_cookie_bad_session_token', $cookie_elements );
     
    780824         * @since 2.7.0
    781825         *
    782          * @param string[] $cookie_elements An array of data for the authentication cookie.
     826         * @param string[] $cookie_elements {
     827         *     Authentication cookie components.
     828         *
     829         *     @type string $username   User's username.
     830         *     @type string $expiration The time the cookie expires as a UNIX timestamp.
     831         *     @type string $token      User's session token used.
     832         *     @type string $hmac       The security hash for the cookie.
     833         *     @type string $scheme     The cookie scheme to use.
     834         * }
    783835         * @param WP_User  $user            User object.
    784836         */
     
    848900     * @param string $cookie Authentication cookie.
    849901     * @param string $scheme Optional. The cookie scheme to use: 'auth', 'secure_auth', or 'logged_in'.
    850      * @return string[]|false Authentication cookie components.
     902     * @return string[]|false {
     903     *     Authentication cookie components. None of the components should be assumed
     904     *     to be valid as they come directly from a client-provided cookie value. If
     905     *     the cookie value is malformed, false is returned.
     906     *
     907     *     @type string $username   User's username.
     908     *     @type string $expiration The time the cookie expires as a UNIX timestamp.
     909     *     @type string $token      User's session token used.
     910     *     @type string $hmac       The security hash for the cookie.
     911     *     @type string $scheme     The cookie scheme to use.
     912     * }
    851913     */
    852914    function wp_parse_auth_cookie( $cookie = '', $scheme = '' ) {
Note: See TracChangeset for help on using the changeset viewer.