Hi Emilien,
Sorry that the plugin isn’t working in your scenario.
However, there is a solution, if you have access to the code. We have added a hook (filters) to change the action of the theme. it’s modify_iul_action. You can use that filter to modify the action of the plugin.
As per now here is a code snippets which can be added to your custom plugin, or child theme.
add_filter( 'iul_action', 'modify_iul_action' );
function modify_iul_action($action){
$action['action_type'] = 2; /* 2: Logout and redirect to login page */
$action['timer'] = 40; /* add this line if you want to change timer's default value. Otherwise remove this line */
return $action;
}
Hope it helps.
Regards
Hello again,
Did this solve your issue, for now?
We will be making this plugin multisite compatible, so that you don’t have to add this code anymore.
If this gave you the solution, please mark this as resolved.
Thanks
Hello Abiral,
thank you for you messages and sorry that I respond so late.
Regarding the code snippet, I’d need to redirect to a custom page instead of the login one, would it be feasible?
Thank you again and have a nice day,
Emilien
Hello,
Yes that one is feasible too.
But since you are in multisite, you need to enter url of the page manually.
Look at the code below:
add_filter( 'iul_action', 'modify_iul_action' );
function modify_iul_action($action){
/*
* Action Types:
* 1: Bypass logout
* 2: Logout and redirect to login page
* 3: Logout user and redirect - requires action_value
* 4: Do not logout but show page in popup - requires modal [ html that is meant to be displayed in popup ]
* 5: Do not logout but redirect to page - requires action_value
*/
$action['action_type'] = 3;
$action['action_value'] = 'http://ww.wp.xz.cn'; //URL of the page
// $action['timer'] = 40;
//$action['modal'] = 'html content';
return $action;
}
For reference, I have added a list of action_type that the plugin supports. You can make the changes as per your requirement.
$action['action_type'] = 3 tells plugin to logout and redirect to the page
`$action[‘action_value’] = ‘your-page-url’ tells where to redirect
// $action['timer'] = 40; is optional one. You can change timer if you want.
//$action['modal'] = 'html content'; is needed if your action_type was 4
Hope this helps.
Thanks
Thank your so much for such a quick and efficient support, I’ll have it tested and keep you posted 😉 have a great day!
Hello emiliengerbois,
Did it solve your issue?
If so, please mark it as resolved 🙂
Thanks