Skip to content

Commit 2a6b073

Browse files
committed
Canonical: Only redirect for publicly viewable post types.
Props lucasbustamante, peterwilsoncc, jorbin. Merges [63060] into the 7.0 branch. git-svn-id: https://develop.svn.wordpress.org/branches/7.0@63069 602fd350-edb4-49c9-b593-d223f7449a82
1 parent a12c8f5 commit 2a6b073

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎src/wp-includes/canonical.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -985,7 +985,7 @@ function redirect_guess_404_permalink() {
985985
if ( empty( $post_types ) ) {
986986
return false;
987987
}
988-
$where .= " AND post_type IN ('" . join( "', '", esc_sql( get_query_var( 'post_type' ) ) ) . "')";
988+
$where .= " AND post_type IN ('" . join( "', '", esc_sql( $post_types ) ) . "')";
989989
} else {
990990
if ( ! in_array( get_query_var( 'post_type' ), $publicly_viewable_post_types, true ) ) {
991991
return false;

0 commit comments

Comments
 (0)