WP_REST_Widget_Types_Controller::render() WordPress Method
The WP_REST_Widget_Types_Controller::render() method is responsible for rendering a Widget Type for display in the WordPress Administration.
WP_REST_Widget_Types_Controller::render( WP_REST_Request $request ) #
Renders a single Legacy Widget and wraps it in a JSON-encodable array.
Parameters
- $request
(WP_REST_Request)(Required)Full details about the request.
Return
(array) An array with rendered Legacy Widget HTML.
Source
File: wp-includes/rest-api/endpoints/class-wp-rest-widget-types-controller.php
public function render( $request ) { return array( 'preview' => $this->render_legacy_widget_preview_iframe( $request['id'], isset( $request['instance'] ) ? $request['instance'] : null ), ); }
Expand full source codeCollapse full source codeView on TracView on GitHub
Changelog
Version | Description |
---|---|
5.9.0 | Introduced. |