WordPress on Routes is a plugin for WordPress, inspired mainly by Ruby micro-frameworks. It adds ability to add custom routes to your WordPress instance. Useful for form submissions, API-like features, etc.
This plugin allows you to:
- Add custom routes to your WordPress installation
- Set method GET/POST/DELETE etc.
- Set body (as text, or template) or action (using add/do_action). If both are defined,
action
takes precedence over body
.
- Set header (e.g. 'Content-Type' => 'text/html; charset=UTF-8')
- Exclude header (e.g. 'Set-Cookie')
- Set parameter like '/my/route/:param1/:param2'
- Add agents or filter by agents, using regular expressions
- Agent filter for negative logic (e.g. /^((?!Firefox).)$/, which tells "every browser except Firefox")
- Include header and footer
For basic and advanced usage examples, take a look at
https://github.com/markzero/wp-on-routes.
Good old plugin installation applies here too - download it / clone it to
plugins/
dir, activate.
If you want to clone it, here is the repository:
https://github.com/markzero/wp-on-routes
No UI involved.