Skip to main content
10 events
when toggle format what by license comment
Apr 15, 2021 at 15:55 history edited birgire CC BY-SA 4.0
added 90 characters in body
Apr 15, 2021 at 15:52 comment added birgire Thanks @rassoh, I should have mentioned that this should be used with "Remember me" checked, else we get the session expire.
Apr 15, 2021 at 14:02 comment added rassoh This looks great! But, weirdly, if I fully close my browser and reopen it, I still have to login again... It only remembers me between browser sessions if I check 'Remember Me' on the login screen. I looked into wp_set_auth_cookie in pluggable.php and this seems to cause the different behavior if $remember is false: $expire = 0;
Sep 15, 2020 at 16:34 history edited birgire CC BY-SA 4.0
added 154 characters in body
Sep 13, 2020 at 18:17 comment added birgire Looks like you're using the same domain for all. Sounds like you're building your own sub-directory multisite. Maybe you should look into WP multisite? Maybe you can add your own redirection to homepage to avoid manual reloading, but be careful when deploying with auto-login code and for storing passwords in php files.
Sep 13, 2020 at 16:43 comment added Karich Nikita I also had updated the question with problem demonstration
Sep 13, 2020 at 16:38 comment added Karich Nikita Thanks for answer, but I am unsure about implementation environments with 'WP_ENVIRONMENT_TYPE', the main problem (now) that after switch I have to reload page to login in and for admin bar appear. I suppose it is a great point about different cookie domains (cuz I switch between different DBs even there is same log-pass), but honestly I am not so know how cookies works under the hood.
Sep 12, 2020 at 21:24 history edited birgire CC BY-SA 4.0
added 274 characters in body
Sep 12, 2020 at 21:13 history edited birgire CC BY-SA 4.0
added 65 characters in body
Sep 12, 2020 at 20:44 history answered birgire CC BY-SA 4.0