WP_Customize_Selective_Refresh::get_partial() WordPress Method

The WP_Customize_Selective_Refresh::get_partial() method is used to get a partial for a given setting. A partial represents a fragment of a template that can be refreshed without refreshing the entire template. This is useful for updating small pieces of content, such as a post title or a comment, without having to reload the entire page.

WP_Customize_Selective_Refresh::get_partial( string $id ) #

Retrieves a partial.


Parameters

$id

(string)(Required)Customize Partial ID.


Top ↑

Return

(WP_Customize_Partial|null) The partial, if set. Otherwise null.


Top ↑

Source

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

	public function get_partial( $id ) {
		if ( isset( $this->partials[ $id ] ) ) {
			return $this->partials[ $id ];
		} else {
			return null;
		}
	}


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.