Make WordPress Core


Ignore:
Timestamp:
07/10/2023 10:46:22 PM (3 years ago)
Author:
audrasjb
Message:

Docs: Replace multiple single line comments with multi-line comments.

This changeset updates various comments as per WordPress PHP Inline Documentation Standards.
See https://developer.wordpress.org/coding-standards/inline-documentation-standards/php/#5-inline-comments.

Follow-up to [56174], [56175], [56176], [56177], [56178], [56179], [56180], [56191].

Props costdev, audrasjb.
See #58459.

File:
1 edited

Legend:

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

    r56037 r56192  
    268268                } else {
    269269                        if ( ! is_array( $headers ) ) {
    270                                 // Explode the headers out, so this function can take
    271                                 // both string headers and an array of headers.
     270                                /*
     271                                 * Explode the headers out, so this function can take
     272                                 * both string headers and an array of headers.
     273                                 */
    272274                                $tempheaders = explode( "\n", str_replace( "\r\n", "\n", $headers ) );
    273275                        } else {
     
    617619
    618620                if ( null == $user ) {
    619                         // TODO: What should the error message be? (Or would these even happen?)
    620                         // Only needed if all authentication handlers fail to return anything.
     621                        /*
     622                         * TODO: What should the error message be? (Or would these even happen?)
     623                         * Only needed if all authentication handlers fail to return anything.
     624                         */
    621625                        $user = new WP_Error( 'authentication_failed', __( '<strong>Error:</strong> Invalid username, email address or incorrect password.' ) );
    622626                }
     
    15621566                }
    15631567
    1564                 // In PHP 5 parse_url() may fail if the URL query part contains 'http://'.
    1565                 // See https://bugs.php.net/bug.php?id=38143
     1568                /*
     1569                 * In PHP 5 parse_url() may fail if the URL query part contains 'http://'.
     1570                 * See https://bugs.php.net/bug.php?id=38143
     1571                 */
    15661572                $cut  = strpos( $location, '?' );
    15671573                $test = $cut ? substr( $location, 0, $cut ) : $location;
     
    15881594                }
    15891595
    1590                 // Reject if certain components are set but host is not.
    1591                 // This catches URLs like https:host.com for which parse_url() does not set the host field.
     1596                /*
     1597                 * Reject if certain components are set but host is not.
     1598                 * This catches URLs like https:host.com for which parse_url() does not set the host field.
     1599                 */
    15921600                if ( ! isset( $lp['host'] ) && ( isset( $lp['scheme'] ) || isset( $lp['user'] ) || isset( $lp['pass'] ) || isset( $lp['port'] ) ) ) {
    15931601                        return $fallback_url;
     
    17151723                }
    17161724
    1717                 // The blogname option is escaped with esc_html() on the way into the database in sanitize_option().
    1718                 // We want to reverse this for the plain text arena of emails.
     1725                /*
     1726                 * The blogname option is escaped with esc_html() on the way into the database in sanitize_option().
     1727                 * We want to reverse this for the plain text arena of emails.
     1728                 */
    17191729                $blogname        = wp_specialchars_decode( get_option( 'blogname' ), ENT_QUOTES );
    17201730                $comment_content = wp_specialchars_decode( $comment->comment_content );
     
    19041914                $comments_waiting = $wpdb->get_var( "SELECT COUNT(*) FROM $wpdb->comments WHERE comment_approved = '0'" );
    19051915
    1906                 // The blogname option is escaped with esc_html() on the way into the database in sanitize_option().
    1907                 // We want to reverse this for the plain text arena of emails.
     1916                /*
     1917                 * The blogname option is escaped with esc_html() on the way into the database in sanitize_option().
     1918                 * We want to reverse this for the plain text arena of emails.
     1919                 */
    19081920                $blogname        = wp_specialchars_decode( get_option( 'blogname' ), ENT_QUOTES );
    19091921                $comment_content = wp_specialchars_decode( $comment->comment_content );
     
    20432055         */
    20442056        function wp_password_change_notification( $user ) {
    2045                 // Send a copy of password change notification to the admin,
    2046                 // but check to see if it's the admin whose password we're changing, and skip this.
     2057                /*
     2058                 * Send a copy of password change notification to the admin,
     2059                 * but check to see if it's the admin whose password we're changing, and skip this.
     2060                 */
    20472061                if ( 0 !== strcasecmp( $user->user_email, get_option( 'admin_email' ) ) ) {
    20482062                        /* translators: %s: User name. */
    20492063                        $message = sprintf( __( 'Password changed for user: %s' ), $user->user_login ) . "\r\n";
    2050                         // The blogname option is escaped with esc_html() on the way into the database in sanitize_option().
    2051                         // We want to reverse this for the plain text arena of emails.
     2064                        /*
     2065                         * The blogname option is escaped with esc_html() on the way into the database in sanitize_option().
     2066                         * We want to reverse this for the plain text arena of emails.
     2067                         */
    20522068                        $blogname = wp_specialchars_decode( get_option( 'blogname' ), ENT_QUOTES );
    20532069
     
    21162132                $user = get_userdata( $user_id );
    21172133
    2118                 // The blogname option is escaped with esc_html() on the way into the database in sanitize_option().
    2119                 // We want to reverse this for the plain text arena of emails.
     2134                /*
     2135                 * The blogname option is escaped with esc_html() on the way into the database in sanitize_option().
     2136                 * We want to reverse this for the plain text arena of emails.
     2137                 */
    21202138                $blogname = wp_specialchars_decode( get_option( 'blogname' ), ENT_QUOTES );
    21212139
     
    25732591                }
    25742592
    2575                 // If the stored hash is longer than an MD5,
    2576                 // presume the new style phpass portable hash.
     2593                /*
     2594                 * If the stored hash is longer than an MD5,
     2595                 * presume the new style phpass portable hash.
     2596                 */
    25772597                if ( empty( $wp_hasher ) ) {
    25782598                        require_once ABSPATH . WPINC . '/class-phpass.php';
     
    26522672                global $rnd_value;
    26532673
    2654                 // Some misconfigured 32-bit environments (Entropy PHP, for example)
    2655                 // truncate integers larger than PHP_INT_MAX to PHP_INT_MAX rather than overflowing them to floats.
     2674                /*
     2675                 * Some misconfigured 32-bit environments (Entropy PHP, for example)
     2676                 * truncate integers larger than PHP_INT_MAX to PHP_INT_MAX rather than overflowing them to floats.
     2677                 */
    26562678                $max_random_number = 3000000000 === 2147483647 ? (float) '4294967295' : 4294967295; // 4294967295 = 0xffffffff
    26572679
     
    26882710                }
    26892711
    2690                 // Reset $rnd_value after 14 uses.
    2691                 // 32 (md5) + 40 (sha1) + 40 (sha1) / 8 = 14 random numbers from $rnd_value.
     2712                /*
     2713                 * Reset $rnd_value after 14 uses.
     2714                 * 32 (md5) + 40 (sha1) + 40 (sha1) / 8 = 14 random numbers from $rnd_value.
     2715                 */
    26922716                if ( strlen( $rnd_value ) < 8 ) {
    26932717                        if ( defined( 'WP_SETUP_CONFIG' ) ) {
Note: See TracChangeset for help on using the changeset viewer.