Changeset 55857
- Timestamp:
- 05/25/2023 12:53:24 PM (17 months ago)
- Location:
- trunk/src
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/export.php
r55412 r55857 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 ) -
trunk/src/wp-admin/includes/class-wp-list-table.php
r55293 r55857 699 699 $months = $wpdb->get_results( 700 700 $wpdb->prepare( 701 " 702 SELECT DISTINCT YEAR( post_date ) AS year, MONTH( post_date ) AS month 703 FROM $wpdb->posts 704 WHERE post_type = %s 705 $extra_checks 706 ORDER BY post_date DESC 707 ", 701 "SELECT DISTINCT YEAR( post_date ) AS year, MONTH( post_date ) AS month 702 FROM $wpdb->posts 703 WHERE post_type = %s 704 $extra_checks 705 ORDER BY post_date DESC", 708 706 $post_type 709 707 ) -
trunk/src/wp-admin/includes/post.php
r55758 r55857 1011 1011 1012 1012 $keys = $wpdb->get_col( 1013 " 1014 SELECT meta_key 1015 FROM $wpdb->postmeta 1016 GROUP BY meta_key 1017 ORDER BY meta_key" 1013 "SELECT meta_key 1014 FROM $wpdb->postmeta 1015 GROUP BY meta_key 1016 ORDER BY meta_key" 1018 1017 ); 1019 1018 -
trunk/src/wp-includes/class-wp-tax-query.php
r55732 r55857 467 467 $where = $wpdb->prepare( 468 468 "$operator ( 469 SELECT 1470 FROM $wpdb->term_relationships471 INNER JOIN $wpdb->term_taxonomy472 ON $wpdb->term_taxonomy.term_taxonomy_id = $wpdb->term_relationships.term_taxonomy_id473 WHERE $wpdb->term_taxonomy.taxonomy = %s474 AND $wpdb->term_relationships.object_id = $this->primary_table.$this->primary_id_column475 )",469 SELECT 1 470 FROM $wpdb->term_relationships 471 INNER JOIN $wpdb->term_taxonomy 472 ON $wpdb->term_taxonomy.term_taxonomy_id = $wpdb->term_relationships.term_taxonomy_id 473 WHERE $wpdb->term_taxonomy.taxonomy = %s 474 AND $wpdb->term_relationships.object_id = $this->primary_table.$this->primary_id_column 475 )", 476 476 $clause['taxonomy'] 477 477 ); -
trunk/src/wp-includes/class-wp-user-query.php
r55732 r55857 1010 1010 $where 1011 1011 GROUP BY post_author 1012 ) p ON ({$wpdb->users}.ID = p.post_author) 1013 "; 1012 ) p ON ({$wpdb->users}.ID = p.post_author)"; 1014 1013 $_orderby = 'post_count'; 1015 1014 } elseif ( 'ID' === $orderby || 'id' === $orderby ) { -
trunk/src/wp-includes/deprecated.php
r55856 r55857 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 4572 $sql = $wpdb->prepare( 4575 " 4576 SELECT ID 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 -
trunk/src/wp-includes/general-template.php
r55703 r55857 2299 2299 WHERE post_date < '$thisyear-$thismonth-01' 2300 2300 AND post_type = 'post' AND post_status = 'publish' 2301 2302 2301 ORDER BY post_date DESC 2302 LIMIT 1" 2303 2303 ); 2304 2304 $next = $wpdb->get_row( … … 2307 2307 WHERE post_date > '$thisyear-$thismonth-{$last_day} 23:59:59' 2308 2308 AND post_type = 'post' AND post_status = 'publish' 2309 2310 2309 ORDER BY post_date ASC 2310 LIMIT 1" 2311 2311 ); 2312 2312 -
trunk/src/wp-includes/media.php
r55847 r55857 4485 4485 if ( null === $show_audio_playlist ) { 4486 4486 $show_audio_playlist = $wpdb->get_var( 4487 " 4488 SELECT ID 4487 "SELECT ID 4489 4488 FROM $wpdb->posts 4490 4489 WHERE post_type = 'attachment' 4491 4490 AND post_mime_type LIKE 'audio%' 4492 LIMIT 1 4493 " 4491 LIMIT 1" 4494 4492 ); 4495 4493 } … … 4515 4513 if ( null === $show_video_playlist ) { 4516 4514 $show_video_playlist = $wpdb->get_var( 4517 " 4518 SELECT ID 4515 "SELECT ID 4519 4516 FROM $wpdb->posts 4520 4517 WHERE post_type = 'attachment' 4521 4518 AND post_mime_type LIKE 'video%' 4522 LIMIT 1 4523 " 4519 LIMIT 1" 4524 4520 ); 4525 4521 } … … 4544 4540 $months = $wpdb->get_results( 4545 4541 $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 ", 4542 "SELECT DISTINCT YEAR( post_date ) AS year, MONTH( post_date ) AS month 4543 FROM $wpdb->posts 4544 WHERE post_type = %s 4545 ORDER BY post_date DESC", 4552 4546 'attachment' 4553 4547 ) -
trunk/src/wp-includes/user.php
r55747 r55857 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 )
Note: See TracChangeset
for help on using the changeset viewer.