WP_Customize_Selective_Refresh::is_render_partials_request() WordPress Method

The is_render_partials_request() method is used to check if the current request is for partial renders. This is useful for determining if selective refresh should be enabled or not.

WP_Customize_Selective_Refresh::is_render_partials_request() #

Checks whether the request is for rendering partials.


Description

Note that this will not consider whether the request is authorized or valid, just that essentially the route is a match.


Top ↑

Return

(bool) Whether the request is for rendering partials.


Top ↑

Source

File: wp-includes/customize/class-wp-customize-selective-refresh.php

	public function is_render_partials_request() {
		return ! empty( $_POST[ self::RENDER_QUERY_VAR ] );
	}


Top ↑

Changelog

Changelog
VersionDescription
4.5.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.