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-admin/includes/nav-menu.php

    r54834 r54891  
    3333
    3434    if ( 'markup' === $response_format ) {
    35         $args['walker'] = new Walker_Nav_Menu_Checklist;
     35        $args['walker'] = new Walker_Nav_Menu_Checklist();
    3636    }
    3737
     
    430430
    431431    // @todo Transient caching of these results with proper invalidation on updating of a post of this type.
    432     $get_posts = new WP_Query;
     432    $get_posts = new WP_Query();
    433433    $posts     = $get_posts->query( $args );
    434434
     
    437437        if ( ! empty( $suppress_page_ids ) ) {
    438438            unset( $args['post__not_in'] );
    439             $get_posts = new WP_Query;
     439            $get_posts = new WP_Query();
    440440            $posts     = $get_posts->query( $args );
    441441        } else {
     
    10601060
    10611061        if ( class_exists( $walker_class_name ) ) {
    1062             $walker = new $walker_class_name;
     1062            $walker = new $walker_class_name();
    10631063        } else {
    10641064            return new WP_Error(
Note: See TracChangeset for help on using the changeset viewer.