Make WordPress Core


Ignore:
Timestamp:
11/29/2022 03:49:49 PM (2 years ago)
Author:
SergeyBiryukov
Message:

Coding Standards: Always use parentheses when instantiating an object.

Note: This will be enforced by WPCS 3.0.0.

Props jrf.
See #56791.

File:
1 edited

Legend:

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

    r54888 r54891  
    172172    $parsed_args = wp_parse_args( $args, $defaults );
    173173
    174     $query = new WP_Comment_Query;
     174    $query = new WP_Comment_Query();
    175175    return $query->query( $parsed_args );
    176176}
     
    241241 */
    242242function get_comments( $args = '' ) {
    243     $query = new WP_Comment_Query;
     243    $query = new WP_Comment_Query();
    244244    return $query->query( $args );
    245245}
     
    10241024
    10251025    if ( $threaded ) {
    1026         $walker = new Walker_Comment;
     1026        $walker = new Walker_Comment();
    10271027        $count  = ceil( $walker->get_number_of_root_elements( $comments ) / $per_page );
    10281028    } else {
Note: See TracChangeset for help on using the changeset viewer.