开发者 | coffee2code |
---|---|
更新时间 | 2024年9月5日 03:20 |
捐献地址: | 去捐款 |
PHP版本: | 5.5 及以上 |
WordPress版本: | 6.6 |
版权: | GPLv2 or later |
版权网址: | 版权信息 |
/wp-content/plugins/
).By default, if you log in without "Remember Me" checked, WordPress keeps you logged in for up to 2 days. If you check "Remember Me" (without this plugin active), WordPress keeps you logged in for up to 14 days.
WordPress remembers who you are based on cookies stored in your web browser. If you use a different web browser, clear your cookies, use a browser on a different machine, the site owner invalidates all existing login sessions, or you uninstall/reinstall (and possibly even just restart) your browser then you will have to log in again since WordPress will not be able to locate the cookies needed to identify you. Also, if you changed the remember me duration but hadn't logged out after having done so, that particular login session would still be affected by the default (or previously configured) duration.
You can't (and probably shouldn't). With a session length of less than an hour you risk timing out users too quickly.
No. The duration for which a login cookie is valid is defined within the cookie when it gets created (which is when you log in). Changing the setting for the remember me duration will only affect cookies created thereafter. You can log out and then log back in if you want the newly configured remember me duration to apply to your session. More precisely, the changes take effect for all new logins, which can happen after a preexisting login session expires, the user logs out, or the user's cookies are cleared in their browser (manually or automatically).
Certain settings being enabled may disable other settings that get superceded by the enabled setting. For instance, if the "Never remember?" setting is enabled, then all other settings are disabled since they wouldn't apply. The onscreen help text for each setting indicates what other settings are relatedly affected.
As explained in the previous FAQ entry, changes to the plugin's settings only take effect the next time a user logs in. Existing login sessions will abide by the remember me duration configured at the time they logged into their current session. The login cookies for a user session can become invalidated by the visitor by logging out or clearing their cookies. Here are some options to force all active login sessions to abide by the current login session duration:
Special handling has been added to provide compatibility with the following plugins:
Yes. This plugin does not collect, store, or disseminate any information from any users or site visitors.
Yes. The tests are not packaged in the release .zip file or included in plugins.svn.wordpress.org, but can be found in the plugin's GitHub repository.
form_action_url()
to avoid using a server globalform_action_url()
in plugin_action_links()
rather than duplicating its functionalityregister_filters()
to an abstract declarationget_hook()
public rather than protectedform_action_url()
form_action_url()
in plugin_action_links()
rather than duplicating its functionality.gitignore
filereadme.txt
README.md
bootstrap.php
composer.json
for PHPUnit Polyfill dependencyget_default_remembered_login_duration()
get_login_session_duration()
to indicate if the default duration should be the default remembered duration or nottype
attribute to script
and style
tags'admin_enqueue_scripts'
action instead of during 'init'
is_plugin_admin_page()
in help_tabs()
instead of reproducing its functionalityis_plugin_admin_page()
is used before 'admin_init'
action is firedis_plugin_admin_page()
to use get_current_screen()
when availablestyle
tagc2c_{PluginName}_Plugin_051
to c2c_Plugin_060
get_c2c_string()
as a getter for translated stringsget_c2c_string()
whitelist_options()
to allowed_options()
add_allowed_options()
instead of deprecated add_option_whitelist()
for WP 5.5+allowed_options
filter instead of deprecated whitelist_options
for WP 5.5+is_wp_version_cmp()
and get_c2c_string()
)is_wp_version_cmp()
as a utility to compare current WP version against a given WP versioncontextual_help()
to be easier to read, and correct function docblocksbin/
into tests/
tests/bootstrap.php
into tests/phpunit/
tests/test-*.php
into tests/phpunit/tests/
phpunit.xml
to phpunit.xml.dist
per best practices