src/wp-admin/export.php | 10 ++++------
src/wp-includes/deprecated.php | 12 ++++--------
src/wp-includes/media.php | 10 ++++------
src/wp-includes/user.php | 10 ++++------
4 files changed, 16 insertions(+), 26 deletions(-)
diff --git a/src/wp-admin/export.php b/src/wp-admin/export.php
index 6e4c335190..7c59c9e6c0 100644
a
|
b
|
function export_date_options( $post_type = 'post' ) { |
141 | 141 | |
142 | 142 | $months = $wpdb->get_results( |
143 | 143 | $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", |
150 | 148 | $post_type |
151 | 149 | ) |
152 | 150 | ); |
diff --git a/src/wp-includes/deprecated.php b/src/wp-includes/deprecated.php
index d2885ef497..f72cf4a4c0 100644
a
|
b
|
function get_page_by_title( $page_title, $output = OBJECT, $post_type = 'page' ) |
4562 | 4562 | $post_type = esc_sql( $post_type ); |
4563 | 4563 | $post_type_in_string = "'" . implode( "','", $post_type ) . "'"; |
4564 | 4564 | $sql = $wpdb->prepare( |
4565 | | " |
4566 | | SELECT ID |
| 4565 | "SELECT ID |
4567 | 4566 | FROM $wpdb->posts |
4568 | 4567 | WHERE post_title = %s |
4569 | | AND post_type IN ($post_type_in_string) |
4570 | | ", |
| 4568 | AND post_type IN ($post_type_in_string)", |
4571 | 4569 | $page_title |
4572 | 4570 | ); |
4573 | 4571 | } else { |
4574 | | $sql = $wpdb->prepare( |
4575 | | " |
| 4572 | $sql = $wpdb->prepare(" |
4576 | 4573 | SELECT ID |
4577 | 4574 | FROM $wpdb->posts |
4578 | 4575 | WHERE post_title = %s |
4579 | | AND post_type = %s |
4580 | | ", |
| 4576 | AND post_type = %s", |
4581 | 4577 | $page_title, |
4582 | 4578 | $post_type |
4583 | 4579 | ); |
diff --git a/src/wp-includes/media.php b/src/wp-includes/media.php
index 27dd4dfb3a..ccc7ac1aa5 100644
a
|
b
|
function wp_enqueue_media( $args = array() ) { |
4543 | 4543 | if ( ! is_array( $months ) ) { |
4544 | 4544 | $months = $wpdb->get_results( |
4545 | 4545 | $wpdb->prepare( |
4546 | | " |
4547 | | SELECT DISTINCT YEAR( post_date ) AS year, MONTH( post_date ) AS month |
4548 | | FROM $wpdb->posts |
4549 | | WHERE post_type = %s |
4550 | | ORDER BY post_date DESC |
4551 | | ", |
| 4546 | "SELECT DISTINCT YEAR( post_date ) AS year, MONTH( post_date ) AS month |
| 4547 | FROM $wpdb->posts |
| 4548 | WHERE post_type = %s |
| 4549 | ORDER BY post_date DESC", |
4552 | 4550 | 'attachment' |
4553 | 4551 | ) |
4554 | 4552 | ); |
diff --git a/src/wp-includes/user.php b/src/wp-includes/user.php
index 0669a052d0..8453c22a80 100644
a
|
b
|
function wp_get_users_with_no_role( $site_id = null ) { |
3545 | 3545 | $regex = preg_replace( '/[^a-zA-Z_\|-]/', '', $regex ); |
3546 | 3546 | $users = $wpdb->get_col( |
3547 | 3547 | $wpdb->prepare( |
3548 | | " |
3549 | | SELECT user_id |
3550 | | FROM $wpdb->usermeta |
3551 | | WHERE meta_key = '{$prefix}capabilities' |
3552 | | AND meta_value NOT REGEXP %s |
3553 | | ", |
| 3548 | "SELECT user_id |
| 3549 | FROM $wpdb->usermeta |
| 3550 | WHERE meta_key = '{$prefix}capabilities' |
| 3551 | AND meta_value NOT REGEXP %s", |
3554 | 3552 | $regex |
3555 | 3553 | ) |
3556 | 3554 | ); |