Make WordPress Core


Ignore:
Timestamp:
05/25/2023 12:53:24 PM (2 years 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-admin/export.php

    r55412 r55857  
    142142    $months = $wpdb->get_results(
    143143        $wpdb->prepare(
    144             "
    145         SELECT DISTINCT YEAR( post_date ) AS year, MONTH( post_date ) AS month
    146         FROM $wpdb->posts
    147         WHERE post_type = %s AND post_status != 'auto-draft'
    148         ORDER BY post_date DESC
    149             ",
     144            "SELECT DISTINCT YEAR( post_date ) AS year, MONTH( post_date ) AS month
     145            FROM $wpdb->posts
     146            WHERE post_type = %s AND post_status != 'auto-draft'
     147            ORDER BY post_date DESC",
    150148            $post_type
    151149        )
Note: See TracChangeset for help on using the changeset viewer.