Make WordPress Core

Changeset 63069 for branches/7.0


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

Canonical: Only redirect for publicly viewable post types.

Props lucasbustamante, peterwilsoncc, jorbin.

Merges [63060] into the 7.0 branch.

Location:
branches/7.0
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/7.0

  • branches/7.0/src/wp-includes/canonical.php

    r61136 r63069  
    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 ) ) {
Note: See TracChangeset for help on using the changeset viewer.