WordPress.org

Making WordPress.org

Changeset 2051


Ignore:
Timestamp:
11/06/2015 08:57:25 PM (4 years ago)
Author:
obenland
Message:

Translate: Register route for new project overview page.

Moves GP_WPorg_Route_WP_Plugins into wporg-routes, where it actually belongs.

Props ocean90 for guidance.
Fixes #1365.

Location:
sites/trunk/translate.wordpress.org/includes/gp-plugins/wporg-routes
Files:
1 edited
1 moved

Legend:

Unmodified
Added
Removed
  • sites/trunk/translate.wordpress.org/includes/gp-plugins/wporg-routes/wporg-routes.php

    r1750 r2051  
    99require_once __DIR__ . '/routes/index.php';
    1010require_once __DIR__ . '/routes/locale.php';
     11require_once __DIR__ . '/routes/wp-plugins.php';
    1112
    1213class GP_WPorg_Routes extends GP_Plugin {
     
    4243        GP::$router->prepend( "/locale/$locale/$path/$path", array( 'GP_WPorg_Route_Locale', 'get_locale_projects' ) );
    4344        GP::$router->prepend( "/locale/$locale/$path/$path/$path", array( 'GP_WPorg_Route_Locale', 'get_locale_project' ) );
     45
     46        $project = '([^/]*)/?';
     47        GP::$router->prepend( "/projects/wp-plugins/$project", array( 'GP_WPorg_Route_WP_Plugins', 'get_plugin_projects' ) );
    4448    }
    4549}
Note: See TracChangeset for help on using the changeset viewer.