Changeset 4926
- Timestamp:
- 02/18/2017 04:40:12 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-routes/inc/class-plugin.php
r4354 r4926 77 77 $request_uri = GP::$router->request_uri(); 78 78 $path = '(.+?)'; 79 $dir = '([^_/][^/]*)'; 80 $project = '([^/]*)/?'; 81 79 82 $locale = '(' . implode( '|', array_map( function( $locale ) { return $locale->slug; }, GP_Locales::locales() ) ) . ')'; 80 83 … … 95 98 GP::$router->prepend( '/projects/wp-themes/?', array( __NAMESPACE__ . '\Routes\Redirector', 'redirect_index' ) ); 96 99 100 // Re-add locale glossary GET routes because of the redirect route from above. https://github.com/GlotPress/GlotPress-WP/issues/655. 101 GP::$router->prepend( "(/languages)/$locale/$dir/glossary", array( 'GP_Route_Glossary_Entry', 'glossary_entries_get' ) ); 102 GP::$router->prepend( "(/languages)/$locale/$dir/glossary/-export", array( 'GP_Route_Glossary_Entry', 'export_glossary_entries_get' ) ); 103 GP::$router->prepend( "(/languages)/$locale/$dir/glossary/-import", array( 'GP_Route_Glossary_Entry', 'import_glossary_entries_get' ) ); 104 97 105 // Register custom routes. 98 106 GP::$router->prepend( '/', array( __NAMESPACE__ . '\Routes\Index', 'get_locales' ) ); … … 104 112 GP::$router->prepend( '/consistency', array( __NAMESPACE__ . '\Routes\Consistency', 'get_search_form' ) ); 105 113 106 $project = '([^/]*)/?'; 114 115 // Project routes. 107 116 GP::$router->prepend( "/projects/wp-plugins/$project", array( __NAMESPACE__ . '\Routes\WP_Plugins', 'get_plugin_projects' ) ); 108 117 GP::$router->prepend( "/projects/wp-plugins/$project/contributors", array( __NAMESPACE__ . '\Routes\WP_Plugins', 'get_plugin_contributors' ) );
Note: See TracChangeset
for help on using the changeset viewer.