WP_Customize_Partial::render_callback( WP_Customize_Partial $partial, array $context = array() ): string|array|false

In this article

Default callback used when invoking WP_Customize_Control::render().

Description

Note that this method may echo the partial or return the partial as a string or array, but not both. Output buffering is performed when this is called. Subclasses can override this with their specific logic, or they may provide an ‘render_callback’ argument to the constructor.

This method may return an HTML string for straight DOM injection, or it may return an array for supporting Partial JS subclasses to render by applying to client-side templating.

Parameters

$partialWP_Customize_Partialrequired
Partial.
$contextarrayoptional
Context.

Default:array()

Return

string|array|false

Source

public function render_callback( WP_Customize_Partial $partial, $context = array() ) {
	unset( $partial, $context );
	return false;
}

Changelog

VersionDescription
4.5.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.