May 2017
Beginner to intermediate
536 pages
14h 25m
English
We have a custom router which handles the URLs of the user section of our application. Next, we need a controller to handle the requests and generate the template for the user. This works similar to the controllers in the MVC pattern.
Even though we have changed the default routing, WordPress will look for an existing template to be sent back to the user. Therefore, we need to intercept this process and create our own templates. WordPress offers an action hook called template_redirect for intercepting requests. So, let's implement our frontend controller based on template_redirect. First, we need to update the constructor of the WPWAF_Config_Manager class with the template_redirect action, as shown in ...
Read now
Unlock full access