Make WordPress Core


Ignore:
Timestamp:
11/18/2021 01:55:36 PM (3 years ago)
Author:
johnbillion
Message:

Docs: Corrections relating to types used in inline documentation for comment ID and site ID proprties.

Includes a correction for a typo introduced in [52204].

See #53399

File:
1 edited

Legend:

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

    r52200 r52205  
    4343     *
    4444     * @param string     $author     The comment author's username.
    45      * @param int        $comment_ID The comment ID.
     45     * @param string     $comment_ID The comment ID as a numeric string.
    4646     * @param WP_Comment $comment    The comment object.
    4747     */
     
    6969     *
    7070     * @param string $author     The comment author's username.
    71      * @param int    $comment_ID The comment ID.
     71     * @param string $comment_ID The comment ID as a numeric string.
    7272     */
    7373    echo apply_filters( 'comment_author', $author, $comment->comment_ID );
     
    9494     *
    9595     * @param string     $comment_author_email The comment author's email address.
    96      * @param int        $comment_ID           The comment ID.
     96     * @param string     $comment_ID           The comment ID as a numeric string.
    9797     * @param WP_Comment $comment              The comment object.
    9898     */
     
    126126     *
    127127     * @param string $author_email The comment author's email address.
    128      * @param int    $comment_ID   The comment ID.
     128     * @param string $comment_ID   The comment ID as a numeric string.
    129129     */
    130130    echo apply_filters( 'author_email', $author_email, $comment->comment_ID );
     
    237237     *                           Empty for an invalid URL.
    238238     * @param string $author     The comment author's username.
    239      * @param int    $comment_ID The comment ID.
     239     * @param string $comment_ID The comment ID as a numeric string.
    240240     */
    241241    return apply_filters( 'get_comment_author_link', $return, $author, $comment->comment_ID );
     
    275275     *
    276276     * @param string     $comment_author_IP The comment author's IP address, or an empty string if it's not available.
    277      * @param int        $comment_ID        The comment ID.
     277     * @param string     $comment_ID        The comment ID as a numeric string.
    278278     * @param WP_Comment $comment           The comment object.
    279279     */
     
    321321     * @since 4.1.0 The `$comment_ID` and `$comment` parameters were added.
    322322     *
    323      * @param string     $url        The comment author's URL.
    324      * @param int        $comment_ID The comment ID.
    325      * @param WP_Comment $comment    The comment object.
     323     * @param string          $url        The comment author's URL, or an empty string.
     324     * @param string|int      $comment_ID The comment ID as a numeric string, or 0 if not found.
     325     * @param WP_Comment|null $comment    The comment object, or null if not found.
    326326     */
    327327    return apply_filters( 'get_comment_author_url', $url, $id, $comment );
     
    348348     *
    349349     * @param string $author_url The comment author's URL.
    350      * @param int    $comment_ID The comment ID.
     350     * @param string $comment_ID The comment ID as a numeric string.
    351351     */
    352352    echo apply_filters( 'comment_url', $author_url, $comment->comment_ID );
     
    532532     * @param string[]    $classes    An array of comment classes.
    533533     * @param string[]    $class      An array of additional classes added to the list.
    534      * @param int         $comment_id The comment ID.
     534     * @param string      $comment_id The comment ID as a numeric string.
    535535     * @param WP_Comment  $comment    The comment object.
    536536     * @param int|WP_Post $post_id    The post ID or WP_Post object.
     
    625625     *
    626626     * @param string     $excerpt    The comment excerpt text.
    627      * @param int        $comment_ID The comment ID.
     627     * @param string     $comment_ID The comment ID as a numeric string.
    628628     * @param WP_Comment $comment    The comment object.
    629629     */
     
    651651     *
    652652     * @param string $comment_excerpt The comment excerpt text.
    653      * @param int    $comment_ID      The comment ID.
     653     * @param string $comment_ID      The comment ID as a numeric string.
    654654     */
    655655    echo apply_filters( 'comment_excerpt', $comment_excerpt, $comment->comment_ID );
     
    661661 * @since 1.5.0
    662662 *
    663  * @return int The comment ID.
     663 * @return string The comment ID as a numeric string.
    664664 */
    665665function get_comment_ID() { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.FunctionNameInvalid
     
    670670     *
    671671     * @since 1.5.0
    672      * @since 4.1.0 The `$comment_ID` parameter was added.
    673      *
    674      * @param int        $comment_ID The current comment ID.
     672     * @since 4.1.0 The `$comment` parameter was added.
     673     *
     674     * @param string     $comment_ID The current comment ID as a numeric string.
    675675     * @param WP_Comment $comment    The comment object.
    676676     */
     
    10981098     *
    10991099     * @param string     $comment_type The type of comment, such as 'comment', 'pingback', or 'trackback'.
    1100      * @param int        $comment_ID   The comment ID.
     1100     * @param string     $comment_ID   The comment ID as a numeric string.
    11011101     * @param WP_Comment $comment      The comment object.
    11021102     */
Note: See TracChangeset for help on using the changeset viewer.