开发者 | NipponMonkey |
---|---|
更新时间 | 2010年9月2日 02:23 |
PHP版本: | ??? Try it! 及以上 |
WordPress版本: | 3.0.1 |
/wp-content/plugins/
directoryChange this code in the plugin's main php file. Set the time period to whatever you like.
It's in seconds, so 3x60x60 is equal to 3 hours of inactivity.
define('MM_INACTIVITY_AUTO_LOG_OUT_MAX_INACTIVITY_TIME', 3*60*60);
You can change this definition to any URL you like. The default is site_url(), which is your home page.
You could set it to:
define('MM_INACTIVITY_AUTO_LOG_OUT_REDIRECT_URL', site_url());
define('MM_INACTIVITY_AUTO_LOG_OUT_REDIRECT_URL', 'http://www.example.com');
define('MM_INACTIVITY_AUTO_LOG_OUT_REDIRECT_URL', site_url() . '/auto-logged-out.html');