-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathrouter.php
More file actions
23 lines (21 loc) · 857 Bytes
/
router.php
File metadata and controls
23 lines (21 loc) · 857 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<?php
/*
* Define the templates to use, based on the valid WordPress routes.
*
* Syntax is similar to Express paths in Node
* The key is the route name, and the value is an array of [path, layout, template]
* Values can also be strings, in which case the path is the string and the template name is the key.
*
* If no `template` set, the key is used as the template name.
* If no `layout` set, then the `/layouts/default.php` file is used.
*
* SEE https://github.com/drewbaker/wp-easy/blob/main/README.md
*/
$routes = [
'home' => '/',
'work' => '/work/',
// Would use the /layouts/alternate.php layout, with the /templates/work.php page template
'work-detail' => ['path' => '/work/:spot/', 'layout' => 'alternate', 'template' => 'work'],
'reel' => '/reel/',
];
return $routes;