[ Index ] |
PHP Cross Reference of WordPress |
[Source view] [Print] [Project Stats]
Customize API: WP_Customize_Partial class
File Size: | 329 lines (11 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
WP_Customize_Partial:: (6 methods):
__construct()
id_data()
render()
render_callback()
json()
check_capabilities()
Class: WP_Customize_Partial - X-Ref
Core Customizer class for implementing selective refresh partials.__construct( WP_Customize_Selective_Refresh $component, $id, $args = array() X-Ref |
Constructor. Supplied `$args` override class property defaults. If `$args['settings']` is not defined, use the $id as the setting ID. param: WP_Customize_Selective_Refresh $component Customize Partial Refresh plugin instance. param: string $id Control ID. param: array $args { since: 4.5.0 |
id_data() X-Ref |
Retrieves parsed ID data for multidimensional setting. return: array { since: 4.5.0 |
render( $container_context = array() X-Ref |
Renders the template partial involving the associated settings. return: string|array|false The rendered partial as a string, raw data array (for client-side JS template), param: array $container_context Optional. Array of context data associated with the target container (placement). since: 4.5.0 |
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. return: string|array|false param: WP_Customize_Partial $partial Partial. param: array $context Context. since: 4.5.0 |
json() X-Ref |
Retrieves the data to export to the client via JSON. return: array Array of parameters passed to the JavaScript. since: 4.5.0 |
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. return: bool False if user can't edit one of the related settings, since: 4.5.0 |
Generated: Thu Nov 21 01:00:03 2024 | Cross-referenced by PHPXref 0.7.1 |