Skip to content

Instantly share code, notes, and snippets.

@dknauss
Created September 16, 2024 14:11
Show Gist options
  • Select an option

  • Save dknauss/838d05729e885d54bf356fa6ce1e3d3d to your computer and use it in GitHub Desktop.

Select an option

Save dknauss/838d05729e885d54bf356fa6ce1e3d3d to your computer and use it in GitHub Desktop.
Set Wordpress auth/session cookie check interval and heartbeat interval.
// 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