WordPress开发者和主题制作者的搜索引擎



wp_heartbeat_set_suspension ›

Since3.8.0
已弃用n/a
wp_heartbeat_set_suspension ( $settings )
参数:
  • (array) $settings An array of Heartbeat settings.
    Required: Yes
返回:
  • (array) Filtered Heartbeat settings.
定义在:
文档:

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



源码

function wp_heartbeat_set_suspension( $settings ) {
	global $pagenow;

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

	return $settings;
}