Dynamic action hook in tml_action_handler() always has the same name
-
In the function
tml_action_handler()
insideincludes/actions.php
, a dynamic action name in the form of
'login_form_' . tml_get_request_value( 'action' )
is being called. However, when accessing an TML page, this action parameter doesn’t seem to be set, so the hook is always called simplylogin_form_
.This is our current workaround:
/** * fix TML's dynamic action hook 'login_form_*' */ add_action( 'login_init', 'vad_tml_fix_action_parameter', 10, 0 ); function vad_tml_fix_action_parameter() { if ( empty( tml_get_request_value( 'action' ) ) ) { $current_action = tml_get_action(); if ( $current_action ) { $_REQUEST[ 'action' ] = $current_action->get_name(); } } }
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Dynamic action hook in tml_action_handler() always has the same name’ is closed to new replies.