May 2017
Beginner to intermediate
536 pages
14h 25m
English
Developers who don't prefer the WordPress method of including templates can create their own style of template inclusion. In Chapter 2, Implementing Membership Roles, Permissions, and Features, we used the direct template method with custom routing. Let's recall the implementation to understand the process:
add_action('template_redirect', array($this, 'front_controller')); public function front_controller() { global $wp_query,$wpwaf; $control_action = isset( $wp_query->query_vars['control_action'] ) ? $wp_query->query_vars['control_action'] : ''; switch ( $control_action ) { // Other case statements case 'activate': do_action( 'wpwaf_before_activate_user' ); $wpwaf->registration->activate_user(); do_action( ...Read now
Unlock full access