WordPress at a glance
function is not described

wp_heartbeat_settings() WP 3.6.0

Default settings for heartbeat

Outputs the nonce used in the heartbeat XHR

No Hooks.

Return

Array. Heartbeat settings.

Usage

wp_heartbeat_settings( $settings );
$settings(array) (required)

Changelog

Since 3.6.0 Introduced.

Code of wp_heartbeat_settings() WP 5.5.1

<?php
function wp_heartbeat_settings( $settings ) {
	if ( ! is_admin() ) {
		$settings['ajaxurl'] = admin_url( 'admin-ajax.php', 'relative' );
	}

	if ( is_user_logged_in() ) {
		$settings['nonce'] = wp_create_nonce( 'heartbeat-nonce' );
	}

	return $settings;
}