Make WordPress Core


Ignore:
Timestamp:
05/25/2023 12:53:24 PM (18 months ago)
Author:
SergeyBiryukov
Message:

Coding Standards: Improve formatting of some SQL queries for better readability.

This corrects the placement of double quotes around the query and makes sure the alignment is consistent.

Props umeshmcakadi, mukesh27, krupalpanchal, dhrumilk, SergeyBiryukov.
Fixes #58372.

File:
1 edited

Legend:

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

    r55856 r55857  
    45634563        $post_type_in_string = "'" . implode( "','", $post_type ) . "'";
    45644564        $sql                 = $wpdb->prepare(
    4565             "
    4566             SELECT ID
     4565            "SELECT ID
    45674566            FROM $wpdb->posts
    45684567            WHERE post_title = %s
    4569             AND post_type IN ($post_type_in_string)
    4570         ",
     4568            AND post_type IN ($post_type_in_string)",
    45714569            $page_title
    45724570        );
    45734571    } else {
    45744572        $sql = $wpdb->prepare(
    4575             "
    4576             SELECT ID
     4573            "SELECT ID
    45774574            FROM $wpdb->posts
    45784575            WHERE post_title = %s
    4579             AND post_type = %s
    4580         ",
     4576            AND post_type = %s",
    45814577            $page_title,
    45824578            $post_type
Note: See TracChangeset for help on using the changeset viewer.