Changeset 49193 for trunk/src/wp-includes/class-wp-query.php
- Timestamp:
- 10/18/2020 05:25:10 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-query.php
r49119 r49193 2421 2421 $where .= ' AND 1=0 '; 2422 2422 } else { 2423 $where .= " AND {$wpdb->posts}.post_type IN ('" . join( "', '", array_map( 'esc_sql', $in_search_post_types ) ) . "')";2423 $where .= " AND {$wpdb->posts}.post_type IN ('" . implode( "', '", array_map( 'esc_sql', $in_search_post_types ) ) . "')"; 2424 2424 } 2425 2425 } elseif ( ! empty( $post_type ) && is_array( $post_type ) ) { 2426 $where .= " AND {$wpdb->posts}.post_type IN ('" . join( "', '", esc_sql( $post_type ) ) . "')";2426 $where .= " AND {$wpdb->posts}.post_type IN ('" . implode( "', '", esc_sql( $post_type ) ) . "')"; 2427 2427 } elseif ( ! empty( $post_type ) ) { 2428 2428 $where .= $wpdb->prepare( " AND {$wpdb->posts}.post_type = %s", $post_type ); … … 2486 2486 2487 2487 if ( ! empty( $e_status ) ) { 2488 $statuswheres[] = '(' . join( ' AND ', $e_status ) . ')';2488 $statuswheres[] = '(' . implode( ' AND ', $e_status ) . ')'; 2489 2489 } 2490 2490 if ( ! empty( $r_status ) ) { 2491 2491 if ( ! empty( $q['perm'] ) && 'editable' === $q['perm'] && ! current_user_can( $edit_others_cap ) ) { 2492 $statuswheres[] = "({$wpdb->posts}.post_author = $user_id " . 'AND (' . join( ' OR ', $r_status ) . '))';2492 $statuswheres[] = "({$wpdb->posts}.post_author = $user_id " . 'AND (' . implode( ' OR ', $r_status ) . '))'; 2493 2493 } else { 2494 $statuswheres[] = '(' . join( ' OR ', $r_status ) . ')';2494 $statuswheres[] = '(' . implode( ' OR ', $r_status ) . ')'; 2495 2495 } 2496 2496 } 2497 2497 if ( ! empty( $p_status ) ) { 2498 2498 if ( ! empty( $q['perm'] ) && 'readable' === $q['perm'] && ! current_user_can( $read_private_cap ) ) { 2499 $statuswheres[] = "({$wpdb->posts}.post_author = $user_id " . 'AND (' . join( ' OR ', $p_status ) . '))';2499 $statuswheres[] = "({$wpdb->posts}.post_author = $user_id " . 'AND (' . implode( ' OR ', $p_status ) . '))'; 2500 2500 } else { 2501 $statuswheres[] = '(' . join( ' OR ', $p_status ) . ')';2501 $statuswheres[] = '(' . implode( ' OR ', $p_status ) . ')'; 2502 2502 } 2503 2503 } … … 2670 2670 } 2671 2671 2672 $post_ids = join( ',', $post_ids );2672 $post_ids = implode( ',', $post_ids ); 2673 2673 $join = ''; 2674 2674 if ( $post_ids ) {
Note: See TracChangeset
for help on using the changeset viewer.