Making WordPress.org

Changeset 1141


Ignore:
Timestamp:
01/14/2015 12:57:26 PM (9 years ago)
Author:
kovshenin
Message:

WordCamp.org: Support /month/day/slug/ redirects to /slug/ in addition to the one with the year prefix.

File:
1 edited

Legend:

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

    r1128 r1141  
    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    if ( ! preg_match( '#^(?:/[0-9]{4})?/[0-9]{4}/[0-9]{2}/[0-9]{2}/(.+)$#', $_SERVER['REQUEST_URI'], $matches ) )
    150150        return;
    151151
Note: See TracChangeset for help on using the changeset viewer.