Make WordPress Core

Changeset 63060 for trunk


Ignore:
Timestamp:
08/06/2026 03:30:53 PM (7 weeks ago)
Author:
johnbillion
Message:

Canonical: Only redirect for publicly viewable post types.

Props lucasbustamante, peterwilsoncc, jorbin.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/canonical.php

    r62704 r63060  
    987987                                        return false;
    988988                                }
    989                                 $where .= " AND post_type IN ('" . join( "', '", esc_sql( get_query_var( 'post_type' ) ) ) . "')";
     989                                $where .= " AND post_type IN ('" . join( "', '", esc_sql( $post_types ) ) . "')";
    990990                        } else {
    991991                                if ( ! in_array( get_query_var( 'post_type' ), $publicly_viewable_post_types, true ) ) {
Note: See TracChangeset for help on using the changeset viewer.