WP_Customize_Manager::add_customize_screen_to_heartbeat_settings() WordPress Method

The WP_Customize_Manager::add_customize_screen_to_heartbeat_settings() method allows you to add a customize screen to the heartbeat settings. This can be used to help improve the performance of the Customizer by reducing the number of requests that are made to the server.

WP_Customize_Manager::add_customize_screen_to_heartbeat_settings( array $settings ) #

Filters heartbeat settings for the Customizer.


Parameters

$settings

(array)(Required)Current settings to filter.


Top ↑

Return

(array) Heartbeat settings.


Top ↑

Source

File: wp-includes/class-wp-customize-manager.php

	public function add_customize_screen_to_heartbeat_settings( $settings ) {
		global $pagenow;

		if ( 'customize.php' === $pagenow ) {
			$settings['screenId'] = 'customize';
		}

		return $settings;
	}

Top ↑

Changelog

Changelog
VersionDescription
4.9.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.

Show More