Adding request.get/post to TimberSite#853
Conversation
|
Thanks @connorjburton! I love this. My only question is whether it makes intuitive sense to make this property a child of Site. Does this merit being its own object? IE: Requested salary: ${{request.get.salary}}(also correcting that strange dollar symbol you used in yr example) :-) |
|
Yeah What is this $ you speak of! |
|
Re-factored to it's own class, will test fully tomorrow. |
|
Awesome, thanks @connorjburton! The |
|
I've just added the required interface functions, other than that it works. One thing I noticed, the composer autoloader needs to be updated with the new class. How is that handled on Plugin update? As of now, if I just drop these files in it throws a fatal error. |
|
@connorjburton — I was able to get everything working. Are you talking about when deploying the plugin to wp.org? |
|
Oh I guess its just pre-generated before deploying to wp.org |
Issue
There is no easy way to access GET/POST variables in the Twig templates
Solution
Add
site.requestarray that containssite.request.getandsite.request.postEg.
/vacancies/?salary=30000