wp_heartbeat_set_suspension

函数


wp_heartbeat_set_suspension ( $settings )
参数
  • (array)
    $settings
    An array of Heartbeat settings.
    Required:
返回值
  • (array) Filtered Heartbeat settings.
定义位置
  • wp-admin/includes/misc.php
    , line 1321
引入
3.8.0
弃用

在添加/编辑文章屏幕上禁止暂停Heartbeat。

function wp_heartbeat_set_suspension( $settings ) {
	global $pagenow;

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

	return $settings;
}