[ Index ]

PHP Cross Reference of WordPress




/wp-includes/customize/ -> class-wp-customize-partial.php (summary)

Customize API: WP_Customize_Partial class

File Size: 312 lines (9 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

WP_Customize_Partial:: (6 methods):

Class: WP_Customize_Partial  - X-Ref

Core Customizer class for implementing selective refresh partials.

Representation of a rendered region in the previewed page that gets
selectively refreshed when an associated setting is changed.
This class is analogous of WP_Customize_Control.

__construct( WP_Customize_Selective_Refresh $component, $id, $args = array()   X-Ref

Supplied `$args` override class property defaults.

If `$args['settings']` is not defined, use the $id as the setting ID.

since: 4.5.0
param: WP_Customize_Selective_Refresh $component Customize Partial Refresh plugin instance.
param: string                         $id        Control ID.
param: array                          $args      {

id_data()   X-Ref
Retrieves parsed ID data for multidimensional setting.

since: 4.5.0
return: array {

render( $container_context = array()   X-Ref
Renders the template partial involving the associated settings.

since: 4.5.0
param: array $container_context Optional. Array of context data associated with the target container (placement).
return: string|array|false The rendered partial as a string, raw data array (for client-side JS template),

render_callback( WP_Customize_Partial $partial, $context = array()   X-Ref
Default callback used when invoking WP_Customize_Control::render().

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.

since: 4.5.0
param: WP_Customize_Partial $partial Partial.
param: array                $context Context.
return: string|array|false

json()   X-Ref
Retrieves the data to export to the client via JSON.

since: 4.5.0
return: array Array of parameters passed to the JavaScript.

check_capabilities()   X-Ref
Checks if the user can refresh this partial.

Returns false if the user cannot manipulate one of the associated settings,
or if one of the associated settings does not exist.

since: 4.5.0
return: bool False if user can't edit one of the related settings,

Generated: Mon Jul 6 01:00:03 2020 Cross-referenced by PHPXref 0.7.1