WP_Customize_Partial::render_callback

Advertisement

Summery Summery

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

Syntax Syntax

WP_Customize_Partial::render_callback( WP_Customize_Partial $partial, array $context = array() )

Description 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 Parameters

$partial

(Required) Partial.

$context

(Optional) Context.

Default value: array()

Return Return

(string|array|false)

Source Source

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

	/**
	 * Default callback used when invoking WP_Customize_Control::render().
	 *
	 * Note that this method may echo the partial *or* return the partial as

Advertisement

Changelog Changelog

Changelog
Version Description
4.5.0 Introduced.

Advertisement

Leave a Reply