Changeset 53043 for trunk/src/wp-includes/canonical.php
- Timestamp:
- 04/01/2022 03:23:07 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/canonical.php
r52833 r53043 958 958 } 959 959 960 $publicly_viewable_statuses = array_filter( get_post_stati(), 'is_post_status_viewable' ); 960 961 // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared 961 $post_id = $wpdb->get_var( "SELECT ID FROM $wpdb->posts WHERE $where AND post_status = 'publish'" );962 $post_id = $wpdb->get_var( "SELECT ID FROM $wpdb->posts WHERE $where AND post_status IN ('" . implode( "', '", esc_sql( $publicly_viewable_statuses ) ) . "')" ); 962 963 963 964 if ( ! $post_id ) {
Note: See TracChangeset
for help on using the changeset viewer.