Make WordPress Core

Changeset 47937

Timestamp:
06/09/2020 07:24:23 PM (4 years ago)
Author:
whyisjake
Message:

Canonical: Ensure a redirect for posts missing postname in a query with an ID.

If a site is using /%post_id%/%postname%/ as permalink structure, and is missing the postname, the site won't redirect to the appropriate URL. This change ensure that the redirect happens.

Fixes: #12456.
Props: Frank.Prendergast, dd32, Otto42, hlanggo, wonderboymusic, atimmer, seth17, calvin_ngan, Niresh12495, anbumz, SergeyBiryukov, donmhico.

File:
1 edited

Legend:

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

    r47885 r47937  
    410410
    411411            $redirect['query'] = remove_query_arg( 'page', $redirect['query'] );
     412
     413
     414
     415
     416
     417
     418
     419
     420
     421
     422
    412423        }
    413424
Note: See TracChangeset for help on using the changeset viewer.