wpseek.com
A WordPress-centric search engine for devs and theme authors



wp_heartbeat_set_suspension › WordPress Function

Since3.8.0
Deprecatedn/a
wp_heartbeat_set_suspension ( $settings )
Parameters:
  • (array) $settings An array of Heartbeat settings.
    Required: Yes
Returns:
  • (array) Filtered Heartbeat settings.
Defined at:
Codex:

Disables suspension of Heartbeat on the Add/Edit Post screens.



Source

function wp_heartbeat_set_suspension( $settings ) {
	global $pagenow;

	if ( 'post.php' === $pagenow || 'post-new.php' === $pagenow ) {
		$settings['suspension'] = 'disable';
	}

	return $settings;
}