All other users not saved when Wordpress admin is other than english | Peter's Login Redirect | Forum
Back to the login redirect plugin page
8:48 am
Hi there,
just wanted to share what happened to me today while trying to get your great redirect plugin to fully work.
I was struggling with the 2 textfield of the "all other users" section in the settings page.
It felt like the data wasn't submitted, since it always "forgot" the values and after a submit the mentioned form fields were empty.
The cause relies in the "rul_submit_all" function within the file "wp_login_redirect.php". There, a variable named "$update_or_delete" is compared to a string "Update" or "Delete", which is fine on us/en systems.
Since I was using a localized Wordpress Edition (the german edition that also includes a localized admin section), in my case the caption of the button was "Aktualisieren" instead of "Update".
That caused the comparison to fail and the data not to be stored. I quickly fixed that for me with a simple str_replace.
// Process the rule changes
// ----------------------------------
# quick and dirty fix
$update_or_delete = str_replace('Aktualisieren','Update',$update_or_delete);
$update_or_delete = str_replace('Löschen','Delete',$update_or_delete);
$update_or_delete = str_replace('Löschen','Delete',$update_or_delete);
...
(continue with regular code)
I thought to share this just in case someone else should encounter the same problem.
Cheers