Changeset 3385547
- Timestamp:
- 10/28/2025 03:51:58 AM (7 weeks ago)
- Location:
- stop-logging-me-out
- Files:
-
- 3 edited
- 4 copied
-
tags/1.1.0 (copied) (copied from stop-logging-me-out/trunk)
-
tags/1.1.0/languages/stop-logging-me-out.pot (copied) (copied from stop-logging-me-out/trunk/languages/stop-logging-me-out.pot) (2 diffs)
-
tags/1.1.0/readme.txt (copied) (copied from stop-logging-me-out/trunk/readme.txt) (3 diffs)
-
tags/1.1.0/stop-logging-me-out.php (copied) (copied from stop-logging-me-out/trunk/stop-logging-me-out.php) (4 diffs)
-
trunk/languages/stop-logging-me-out.pot (modified) (2 diffs)
-
trunk/readme.txt (modified) (3 diffs)
-
trunk/stop-logging-me-out.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
stop-logging-me-out/tags/1.1.0/languages/stop-logging-me-out.pot
r3081704 r3385547 3 3 msgid "" 4 4 msgstr "" 5 "Project-Id-Version: Stop Logging Me Out 1. 0.0\n"5 "Project-Id-Version: Stop Logging Me Out 1.1.0\n" 6 6 "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/stop-logging-me-out\n" 7 7 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" … … 10 10 "Content-Type: text/plain; charset=UTF-8\n" 11 11 "Content-Transfer-Encoding: 8bit\n" 12 "POT-Creation-Date: 202 4-05-06T05:36:58+00:00\n"12 "POT-Creation-Date: 2025-10-28T03:32:17+00:00\n" 13 13 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 14 "X-Generator: WP-CLI 2. 9.0\n"14 "X-Generator: WP-CLI 2.12.0\n" 15 15 "X-Domain: stop-logging-me-out\n" 16 16 17 17 #. Plugin Name of the plugin 18 #: stop-logging-me-out.php 18 19 msgid "Stop Logging Me Out" 19 20 msgstr "" 20 21 21 22 #. Description of the plugin 23 #: stop-logging-me-out.php 22 24 msgid "Stop a previously expired session's login page from forcibly logging you out of your current session." 23 25 msgstr "" 24 26 25 27 #. Author of the plugin 28 #: stop-logging-me-out.php 26 29 msgid "Roy Orbitson" 27 30 msgstr "" 28 31 29 32 #. Author URI of the plugin 33 #: stop-logging-me-out.php 30 34 msgid "https://profiles.wordpress.org/lev0/" 31 35 msgstr "" 32 36 33 #: stop-logging-me-out.php:1 6437 #: stop-logging-me-out.php:132 34 38 msgid "You could not be authenticated in order to return you to your session. You will need to log in again." 35 39 msgstr "" 36 40 37 #: stop-logging-me-out.php:2 3241 #: stop-logging-me-out.php:200 38 42 msgid "You have logged in again since this page loaded. Would you like to try returning to your session?" 39 43 msgstr "" 40 44 41 #: stop-logging-me-out.php:2 3345 #: stop-logging-me-out.php:201 42 46 msgid "You have logged in again since this page automatically logged you out. Would you like to try returning to it?" 43 47 msgstr "" -
stop-logging-me-out/tags/1.1.0/readme.txt
r3081704 r3385547 3 3 Tags: login, sessions, annoyances 4 4 Requires at least: 4.0.0 5 Tested up to: 6. 5.26 Stable tag: 1. 0.05 Tested up to: 6.8.3 6 Stable tag: 1.1.0 7 7 Requires PHP: 7.0.0 8 8 License: GPLv2 or later … … 13 13 == Description == 14 14 15 WordPress asks you to reauthenticate when your session expires, or for other security reasons. This is great *except* when you've just done so , and WordPress mistakenly believes you need to do it again and again.15 WordPress asks you to reauthenticate when your session expires, or for other security reasons. This is great *except* when you've just done so (usually in another tab), and WordPress mistakenly believes you need to do it again and again. 16 16 17 This plugin modifies a small portion the login system to prevent login cookies being erased when they don't need to. It may not work in rare instances where that system is already being modified by other third party codein a way that isn't completely compatible with the default WordPress functions.17 This plugin modifies a small portion the login system to try return you to the page you were on. It may not work in rare instances where your login system is already being modified by other third-party code, and in a way that isn't completely compatible with the default WordPress functions. 18 18 19 19 == Installation == … … 25 25 == Changelog == 26 26 27 = 1.1.0 = 28 29 * Refactor to simplify. 30 27 31 = 1.0.0 = 28 32 -
stop-logging-me-out/tags/1.1.0/stop-logging-me-out.php
r3081704 r3385547 3 3 Plugin Name: Stop Logging Me Out 4 4 Description: Stop a previously expired session's login page from forcibly logging you out of your current session. 5 Version: 1. 0.05 Version: 1.1.0 6 6 Requires at least: 4.0.0 7 7 Requires PHP: 7.0.0 … … 28 28 # accumulate values from filters because not available at time we need to set cookie 29 29 $slmo_secure_logged_in_cookie = null; 30 $slmo_send_auth_cookies = null;31 $slmo_expire = null;32 $slmo_user_id = 0;33 30 $slmo_retain_cookies = false; 34 31 $slmo_modify_login = 0; … … 67 64 ); 68 65 69 add_action(70 'set_logged_in_cookie'71 , function($logged_in_cookie, $expire, $expiration, $user_id, $scheme) use (&$slmo_expire, &$slmo_user_id) {72 if ($scheme === 'logged_in') {73 $slmo_expire = $expire;74 $slmo_user_id = $user_id;75 }76 }77 , PHP_INT_MAX78 , 579 );80 81 add_action(82 'clear_auth_cookie'83 , function() use (&$slmo_retain_cookies, &$slmo_user_id) {84 $slmo_retain_cookies = false;85 $slmo_user_id = 0;86 }87 , PHP_INT_MAX88 , 089 );90 91 66 add_filter( 92 67 'send_auth_cookies' 93 , function($send_auth_cookies) use (&$slmo_send_auth_cookies, &$slmo_user_id, &$slmo_retain_cookies, $slmo_cookie_name, $slmo_cookie_path) { 94 if ($slmo_user_id) { 95 $slmo_send_auth_cookies = $send_auth_cookies; 96 } 97 elseif ($slmo_retain_cookies) { 98 $send_auth_cookies = false; # unnecessary session destruction stopped 99 } 100 elseif ($send_auth_cookies) { 101 setcookie($slmo_cookie_name, ' ', time() - YEAR_IN_SECONDS, $slmo_cookie_path(), COOKIE_DOMAIN); # real logout 102 } 103 return $send_auth_cookies; 104 } 105 , PHP_INT_MAX 106 ); 107 108 add_action( 109 'wp_login' 110 , function($user_login) use ($slmo_cookie_name, $slmo_cookie_path, &$slmo_secure_logged_in_cookie, &$slmo_expire, &$slmo_send_auth_cookies) { 111 if ($slmo_send_auth_cookies) { 112 setcookie($slmo_cookie_name, time(), $slmo_expire, $slmo_cookie_path(), COOKIE_DOMAIN, $slmo_secure_logged_in_cookie); 113 } 114 } 115 , PHP_INT_MIN 68 , function($send, $expire, $expiration, $user_id) use (&$slmo_retain_cookies, &$slmo_secure_logged_in_cookie, $slmo_cookie_name, $slmo_cookie_path) { 69 if ($send) { 70 if ($user_id) { # after 'set_logged_in_cookie' 71 setcookie($slmo_cookie_name, time(), $expire, $slmo_cookie_path(), COOKIE_DOMAIN, $slmo_secure_logged_in_cookie); 72 } 73 elseif ($slmo_retain_cookies) { # after 'clear_auth_cookie' 74 $send = false; # stop unnecessary session destruction 75 } 76 else { 77 setcookie($slmo_cookie_name, '', time() - YEAR_IN_SECONDS, $slmo_cookie_path(), COOKIE_DOMAIN); # real logout 78 } 79 } 80 return $send; 81 } 82 , PHP_INT_MAX 83 , 4 116 84 ); 117 85 … … 140 108 && $user->exists() 141 109 ) { 142 # extra redirect logic duplicated from wp-login.php 110 # extra redirect logic duplicated from wp-login.php at end of "if" block below 'login_redirect' filter 143 111 if ( ( empty( $redirect_to ) || 'wp-admin/' === $redirect_to || admin_url() === $redirect_to ) ) { 144 112 // If the user doesn't belong to a blog, send them to user admin. If the user can't edit posts, send them to their profile. -
stop-logging-me-out/trunk/languages/stop-logging-me-out.pot
r3081704 r3385547 3 3 msgid "" 4 4 msgstr "" 5 "Project-Id-Version: Stop Logging Me Out 1. 0.0\n"5 "Project-Id-Version: Stop Logging Me Out 1.1.0\n" 6 6 "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/stop-logging-me-out\n" 7 7 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" … … 10 10 "Content-Type: text/plain; charset=UTF-8\n" 11 11 "Content-Transfer-Encoding: 8bit\n" 12 "POT-Creation-Date: 202 4-05-06T05:36:58+00:00\n"12 "POT-Creation-Date: 2025-10-28T03:32:17+00:00\n" 13 13 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 14 "X-Generator: WP-CLI 2. 9.0\n"14 "X-Generator: WP-CLI 2.12.0\n" 15 15 "X-Domain: stop-logging-me-out\n" 16 16 17 17 #. Plugin Name of the plugin 18 #: stop-logging-me-out.php 18 19 msgid "Stop Logging Me Out" 19 20 msgstr "" 20 21 21 22 #. Description of the plugin 23 #: stop-logging-me-out.php 22 24 msgid "Stop a previously expired session's login page from forcibly logging you out of your current session." 23 25 msgstr "" 24 26 25 27 #. Author of the plugin 28 #: stop-logging-me-out.php 26 29 msgid "Roy Orbitson" 27 30 msgstr "" 28 31 29 32 #. Author URI of the plugin 33 #: stop-logging-me-out.php 30 34 msgid "https://profiles.wordpress.org/lev0/" 31 35 msgstr "" 32 36 33 #: stop-logging-me-out.php:1 6437 #: stop-logging-me-out.php:132 34 38 msgid "You could not be authenticated in order to return you to your session. You will need to log in again." 35 39 msgstr "" 36 40 37 #: stop-logging-me-out.php:2 3241 #: stop-logging-me-out.php:200 38 42 msgid "You have logged in again since this page loaded. Would you like to try returning to your session?" 39 43 msgstr "" 40 44 41 #: stop-logging-me-out.php:2 3345 #: stop-logging-me-out.php:201 42 46 msgid "You have logged in again since this page automatically logged you out. Would you like to try returning to it?" 43 47 msgstr "" -
stop-logging-me-out/trunk/readme.txt
r3081704 r3385547 3 3 Tags: login, sessions, annoyances 4 4 Requires at least: 4.0.0 5 Tested up to: 6. 5.26 Stable tag: 1. 0.05 Tested up to: 6.8.3 6 Stable tag: 1.1.0 7 7 Requires PHP: 7.0.0 8 8 License: GPLv2 or later … … 13 13 == Description == 14 14 15 WordPress asks you to reauthenticate when your session expires, or for other security reasons. This is great *except* when you've just done so , and WordPress mistakenly believes you need to do it again and again.15 WordPress asks you to reauthenticate when your session expires, or for other security reasons. This is great *except* when you've just done so (usually in another tab), and WordPress mistakenly believes you need to do it again and again. 16 16 17 This plugin modifies a small portion the login system to prevent login cookies being erased when they don't need to. It may not work in rare instances where that system is already being modified by other third party codein a way that isn't completely compatible with the default WordPress functions.17 This plugin modifies a small portion the login system to try return you to the page you were on. It may not work in rare instances where your login system is already being modified by other third-party code, and in a way that isn't completely compatible with the default WordPress functions. 18 18 19 19 == Installation == … … 25 25 == Changelog == 26 26 27 = 1.1.0 = 28 29 * Refactor to simplify. 30 27 31 = 1.0.0 = 28 32 -
stop-logging-me-out/trunk/stop-logging-me-out.php
r3081704 r3385547 3 3 Plugin Name: Stop Logging Me Out 4 4 Description: Stop a previously expired session's login page from forcibly logging you out of your current session. 5 Version: 1. 0.05 Version: 1.1.0 6 6 Requires at least: 4.0.0 7 7 Requires PHP: 7.0.0 … … 28 28 # accumulate values from filters because not available at time we need to set cookie 29 29 $slmo_secure_logged_in_cookie = null; 30 $slmo_send_auth_cookies = null;31 $slmo_expire = null;32 $slmo_user_id = 0;33 30 $slmo_retain_cookies = false; 34 31 $slmo_modify_login = 0; … … 67 64 ); 68 65 69 add_action(70 'set_logged_in_cookie'71 , function($logged_in_cookie, $expire, $expiration, $user_id, $scheme) use (&$slmo_expire, &$slmo_user_id) {72 if ($scheme === 'logged_in') {73 $slmo_expire = $expire;74 $slmo_user_id = $user_id;75 }76 }77 , PHP_INT_MAX78 , 579 );80 81 add_action(82 'clear_auth_cookie'83 , function() use (&$slmo_retain_cookies, &$slmo_user_id) {84 $slmo_retain_cookies = false;85 $slmo_user_id = 0;86 }87 , PHP_INT_MAX88 , 089 );90 91 66 add_filter( 92 67 'send_auth_cookies' 93 , function($send_auth_cookies) use (&$slmo_send_auth_cookies, &$slmo_user_id, &$slmo_retain_cookies, $slmo_cookie_name, $slmo_cookie_path) { 94 if ($slmo_user_id) { 95 $slmo_send_auth_cookies = $send_auth_cookies; 96 } 97 elseif ($slmo_retain_cookies) { 98 $send_auth_cookies = false; # unnecessary session destruction stopped 99 } 100 elseif ($send_auth_cookies) { 101 setcookie($slmo_cookie_name, ' ', time() - YEAR_IN_SECONDS, $slmo_cookie_path(), COOKIE_DOMAIN); # real logout 102 } 103 return $send_auth_cookies; 104 } 105 , PHP_INT_MAX 106 ); 107 108 add_action( 109 'wp_login' 110 , function($user_login) use ($slmo_cookie_name, $slmo_cookie_path, &$slmo_secure_logged_in_cookie, &$slmo_expire, &$slmo_send_auth_cookies) { 111 if ($slmo_send_auth_cookies) { 112 setcookie($slmo_cookie_name, time(), $slmo_expire, $slmo_cookie_path(), COOKIE_DOMAIN, $slmo_secure_logged_in_cookie); 113 } 114 } 115 , PHP_INT_MIN 68 , function($send, $expire, $expiration, $user_id) use (&$slmo_retain_cookies, &$slmo_secure_logged_in_cookie, $slmo_cookie_name, $slmo_cookie_path) { 69 if ($send) { 70 if ($user_id) { # after 'set_logged_in_cookie' 71 setcookie($slmo_cookie_name, time(), $expire, $slmo_cookie_path(), COOKIE_DOMAIN, $slmo_secure_logged_in_cookie); 72 } 73 elseif ($slmo_retain_cookies) { # after 'clear_auth_cookie' 74 $send = false; # stop unnecessary session destruction 75 } 76 else { 77 setcookie($slmo_cookie_name, '', time() - YEAR_IN_SECONDS, $slmo_cookie_path(), COOKIE_DOMAIN); # real logout 78 } 79 } 80 return $send; 81 } 82 , PHP_INT_MAX 83 , 4 116 84 ); 117 85 … … 140 108 && $user->exists() 141 109 ) { 142 # extra redirect logic duplicated from wp-login.php 110 # extra redirect logic duplicated from wp-login.php at end of "if" block below 'login_redirect' filter 143 111 if ( ( empty( $redirect_to ) || 'wp-admin/' === $redirect_to || admin_url() === $redirect_to ) ) { 144 112 // If the user doesn't belong to a blog, send them to user admin. If the user can't edit posts, send them to their profile.
Note: See TracChangeset
for help on using the changeset viewer.