Make WordPress Core

Changeset 48026


Ignore:
Timestamp:
06/11/2020 10:53:06 AM (4 years ago)
Author:
SergeyBiryukov
Message:

Canonical: Revert [47937] pending unit tests and further review.

Props needle.
See #12456.

File:
1 edited

Legend:

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

    r47937 r48026  
    410410
    411411            $redirect['query'] = remove_query_arg( 'page', $redirect['query'] );
    412         } elseif ( is_singular() && empty( get_query_var( 'name' ) ) && $post_id ) {
    413             /*
    414              * Redirect example.org/%post_id%/ to canonical url.
    415              * @ticket 12456
    416              */
    417             $redirect_url      = get_permalink( $post_id );
    418             $redirect['query'] = _remove_qs_args_if_not_in_url(
    419                 $redirect['query'],
    420                 array( 'p', 'page_id', 'attachment_id', 'pagename', 'name', 'post_type' ),
    421                 $redirect_url
    422             );
    423412        }
    424413
Note: See TracChangeset for help on using the changeset viewer.