routes
routes copied to clipboard
Simple routing for WordPress
Hey everyone! Is it possible to load `domain.com/invite?referal=X` from typing `domain.com/invite/X/`? The only way I got it to work right now is by redirecting ("Location: domain.com/invite?referal=$params["X"]" and exit), the problem...
I have the following routes in my functions.php: ``` // Create initial worldmap Routes::map('verzeichnis', function() { Routes::load(get_stylesheet_directory() . '/directory/directory.php', null, null, 200); }); // Create fixated slugstructure Routes::map('verzeichnis/:country', function($params) {...
This pull requests extends Upstament's Router by allowing users whether they'd like to display the sanitized slug of the current route in the tag or not. This may play a...
I'm having trouble with certain links. if the url contains same word as an image within wordpress media, the router will redirect me to the image url. for example: the...
**Example:** Add to _functions.php_: ```php Routes::map('hello/world', function( $params ) { Routes::load('hello-world.php'); }); ``` _hello-world.php_: ```php
I have routes: "/flight/:city/:country" - From city to country "/flight/:country/:city" - From country to city On callback i check params and do somthing or nothing. Second route callback dont work.
https://timber.github.io/docs/v2/upgrade-guides/2.0/#removed-routes Since routing has been taken out of Timber 2.0, does that mean this plugin will no longer be maintained? Can I still use this plugin with Timber 2.0 or...
This changes the `map()` method's `$args` array parameter to a `$method` string parameter containing a piped string of the 5 HTTP methods (`GET|POST|PATCH|PUT|DELETE`) to match AltoRouter https://altorouter.com/usage/mapping-routes.html. The `$args` parameter...
PHP version `7.2.29` Trace ``` wp-content/vendor/upstatement/routes/Routes.php:129 Routes::{closure}() wp-includes/class-wp-hook.php:288 do_action('template_redirect') wp-includes/template-loader.php:13 ``` Looks like there is a reliance on this behavior. I'm not sure if it will be removed in a...
Wordpress 4.9.1 (multisite) Timber 1.5.2 When WPML language URL format is "Language name added as a parameter" there is issue with calculating base_path in method Routes::map(). Function get_bloginfo('url') returns URL...