$router->get('{f1}/{f2}/{f3}/{f4}/{f5}', $action); $router->get('{f1}/{f2}/{f3}/{f4}/{f5}/{f6}', $action); $router->get('{f1}/{f2}/{f3}/{f4}/{f5}/{f6}/{f7}', $action); $router->get('{f1}/{f2}/{f3}/{f4}/{f5}/{f6}/{f7}/{f8}', $action); $router->get('{f1}/{f2}/{f3}/{f4}/{f5}/{f6}/{f7}/{f8}/{f9}', $action); } } // /wp-includes for site // MEMO: theme 'twentyfifteen' using... $router->group(['prefix' => 'wp-includes'], function ($router) { add_site_file_download_routes($router); }); // /wp-content for site $router->group(['prefix' => 'wp-content'], function ($router) { // provide files, about css, js, png, ...others. add_site_file_download_routes($router); }); // Templates $router->group(['prefix' => ''], function ($router) { $action = 'TemplateController@provide'; $router->get('', $action); $router->post('', $action); $router->get('{p1}', $action); $router->post('{p1}', $action); $router->get('{p1}/{p2}', $action); $router->post('{p1}/{p2}', $action); $router->get('{p1}/{p2}/{p3}', $action); $router->post('{p1}/{p2}/{p3}', $action); $router->get('{p1}/{p2}/{p3}/{p4}', $action); $router->post('{p1}/{p2}/{p3}/{p4}', $action); $router->get('{p1}/{p2}/{p3}/{p4}/{p5}', $action);
$app->group(['prefix' => $wp_backend_prefix . 'wp-includes', 'namespace' => $wp_namespace], function ($app) { // irregular $app->get('js/tinymce/wp-mce-help.php', 'BlogAdminController@runPhpScript'); $app->get('js/tinymce/wp-tinymce.php', 'BlogAdminController@runPhpScript'); // provide files, about css, js, png, ...others. add_backend_file_download_routes($app); }); // /wp-content for backend $app->group(['prefix' => $wp_backend_prefix . 'wp-content', 'namespace' => $wp_namespace], function ($app) { // provide files, about css, js, png, ...others. add_backend_file_download_routes($app); }); // /wp-content for site $app->group(['prefix' => $wp_site_prefix . 'wp-content', 'namespace' => $wp_namespace], function ($app) { // provide files, about css, js, png, ...others. add_site_file_download_routes($app); }); // Users $app->group(['prefix' => $wp_backend_prefix, 'namespace' => $wp_namespace], function ($app) { $app->get('wp-signup.php', 'UserController@signup'); $app->post('wp-signup.php', 'UserController@signup'); $app->get('wp-activate.php', 'UserController@activate'); $app->post('wp-comments-post.php', 'UserController@commentPost'); }); // Collaborations $app->group(['prefix' => $wp_backend_prefix, 'namespace' => $wp_namespace], function ($app) { //--- Site information ---// // $app->get('?feed=rss2', 'TemplateController@provide'); // $app->get('?feed=comments-rss2', 'TemplateController@provide'); $app->get('wp-links-opml.php', 'CollaborationController@opml'); $app->get('wp-mail.php', 'CollaborationController@mail');