Created
September 16, 2024 14:11
-
-
Save dknauss/838d05729e885d54bf356fa6ce1e3d3d to your computer and use it in GitHub Desktop.
Set Wordpress auth/session cookie check interval and heartbeat interval.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Set the authentication check interval in seconds. | |
| add_filter( 'wp_auth_check_interval', 'auth_check_interval_filter', 99, 1 ); | |
| function auth_check_interval_filter ( $interval ) { | |
| $interval = 1; | |
| return $interval; | |
| } | |
| // Set the heartbeat interval in seconds. | |
| function wb_set_heartbeat_time_interval($settings) { | |
| $settings['interval']=1; | |
| return $settings; | |
| } | |
| add_filter('heartbeat_settings', 'wb_set_heartbeat_time_interval'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment