Making WordPress.org

Changeset 1153


Ignore:
Timestamp:
01/16/2015 10:44:04 AM (10 years ago)
Author:
kovshenin
Message:

WordCamp.org: Match the /year/month/post-name/ permalink when attempting to redirect to /post-name/.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/wcorg-misc.php

    r1141 r1153  
    146146        return;
    147147
    148     // russia.wordcamp.org/2014(/2014)?/11/25/post-name/
    149     if ( ! preg_match( '#^(?:/[0-9]{4})?/[0-9]{4}/[0-9]{2}/[0-9]{2}/(.+)$#', $_SERVER['REQUEST_URI'], $matches ) )
     148    // russia.wordcamp.org/2014/2014/11/25/post-name/
     149    // russia.wordcamp.org/2014/11/25/post-name/
     150    // russia.wordcamp.org/2014/2014/25/post-name/
     151
     152    if ( ! preg_match( '#^/[0-9]{4}/(?:[0-9]{4}/[0-9]{2}|[0-9]{2}|[0-9]{4})/[0-9]{2}/(.+)$#', $_SERVER['REQUEST_URI'], $matches ) )
    150153        return;
    151154
Note: See TracChangeset for help on using the changeset viewer.