WP_Route
WP_Route copied to clipboard
This appears to be capture / execute routes which have no filename in the url?
I have included WP_Route.php and then added
WP_Route::get('/wbl_search', array($this, 'do_search'));
However any request to a folder path/to/product/?test=true
is running do_search?
Ok, so this is because this class is not ready. Lines 160 to 169, only take into account token's of the URL, not actual route matching is happening at all.
Don't use.
Is this project active - i love the simplicity of it - but we are having a few issues - would be happy to contribute - or is there an alternative you recommend?
I think this had the bare bones that I needed, I really can't recall what I used it for. From memory I took this code and just grabbed the bits I needed and made it do what I needed. So It wasn't ready to post back and it wasn't a pull request for this project.
I would consider this project dead at the moment.
Adding one route
WP_Route::get( 'voertuig', 'getVoertuig');
makes /wp-admin/edit.php?post_type=MYPOSTTYPE unreachable. It executes the function as well.
We saw that too - I was thinking of doing an isadmin check to wrap the mapping - but I am not sure that this plugin has enough interest- that does make me question if there is now an alternative way or a lack of interest in direction by wp developers. Does the rest API provide a alternative route that is more inline with the wp approach?
Adding WP_Route and then Timber - I am nervous I am recreating Symfony in WP.
On Wed, 26 Sep 2018 at 11:48, Didou Schol [email protected] wrote:
Adding one route
WP_Route::get( 'voertuig', 'getVoertuig');
makes /wp-admin/edit.php?post_type=MYPOSTTYPE unreachable. It executes the function as well.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/anthonybudd/WP_Route/issues/1#issuecomment-424670943, or mute the thread https://github.com/notifications/unsubscribe-auth/ABAJXbt1chfuHLFlBo0djCJzy17zKboaks5ue1uCgaJpZM4V3yM3 .
--
d