mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 14:20:15 +00:00
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. git-svn-id: https://develop.svn.wordpress.org/trunk@55857 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -4484,13 +4484,11 @@ function wp_enqueue_media( $args = array() ) {
|
||||
$show_audio_playlist = apply_filters( 'media_library_show_audio_playlist', true );
|
||||
if ( null === $show_audio_playlist ) {
|
||||
$show_audio_playlist = $wpdb->get_var(
|
||||
"
|
||||
SELECT ID
|
||||
"SELECT ID
|
||||
FROM $wpdb->posts
|
||||
WHERE post_type = 'attachment'
|
||||
AND post_mime_type LIKE 'audio%'
|
||||
LIMIT 1
|
||||
"
|
||||
LIMIT 1"
|
||||
);
|
||||
}
|
||||
|
||||
@@ -4514,13 +4512,11 @@ function wp_enqueue_media( $args = array() ) {
|
||||
$show_video_playlist = apply_filters( 'media_library_show_video_playlist', true );
|
||||
if ( null === $show_video_playlist ) {
|
||||
$show_video_playlist = $wpdb->get_var(
|
||||
"
|
||||
SELECT ID
|
||||
"SELECT ID
|
||||
FROM $wpdb->posts
|
||||
WHERE post_type = 'attachment'
|
||||
AND post_mime_type LIKE 'video%'
|
||||
LIMIT 1
|
||||
"
|
||||
LIMIT 1"
|
||||
);
|
||||
}
|
||||
|
||||
@@ -4543,12 +4539,10 @@ function wp_enqueue_media( $args = array() ) {
|
||||
if ( ! is_array( $months ) ) {
|
||||
$months = $wpdb->get_results(
|
||||
$wpdb->prepare(
|
||||
"
|
||||
SELECT DISTINCT YEAR( post_date ) AS year, MONTH( post_date ) AS month
|
||||
FROM $wpdb->posts
|
||||
WHERE post_type = %s
|
||||
ORDER BY post_date DESC
|
||||
",
|
||||
"SELECT DISTINCT YEAR( post_date ) AS year, MONTH( post_date ) AS month
|
||||
FROM $wpdb->posts
|
||||
WHERE post_type = %s
|
||||
ORDER BY post_date DESC",
|
||||
'attachment'
|
||||
)
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user