Skip to content
  • Log In
  • Register
WordPress.org
  • News
  • Download & Extend
    • Get WordPress
    • Themes
    • Patterns
    • Plugins
    • Openverse
    • Mobile
    • Hosting
  • Learn
    • Learn WordPress
    • Documentation
    • Forums
    • WordPress.tv
    • Developers
  • Community
    • Make WordPress
    • WordCamp
    • Meetups
    • Photo Directory
    • Job Board
    • Five for the Future
  • About
    • About WordPress
    • Showcase
    • Gutenberg
    • Enterprise
  • Get WordPress
Get WordPress

Developer Resources

Browse: Home / Reference / wp-includes/rest-api/endpoints/class-wp-rest-widget-types-controller.php

WP_REST_Widget_Types_Controller::render()

Method: Renders a single Legacy Widget and wraps it in a JSON-encodable array.

Source: wp-includes/rest-api/endpoints/class-wp-rest-widget-types-controller.php:596

Used by 0 functions | Uses 1 function

WP_REST_Widget_Types_Controller::render_legacy_widget_preview_iframe()

Method: Renders a page containing a preview of the requested Legacy Widget block.

Source: wp-includes/rest-api/endpoints/class-wp-rest-widget-types-controller.php:615

Used by 1 function | Uses 6 functions

rest_prepare_widget_type

Filter Hook: Filters the REST API response for a widget type.

Source: wp-includes/rest-api/endpoints/class-wp-rest-widget-types-controller.php:351

Used by 1 function | Uses 0 functions

WP_REST_Widget_Types_Controller::prepare_links()

Method: Prepares links for the widget type.

Source: wp-includes/rest-api/endpoints/class-wp-rest-widget-types-controller.php:362

Used by 1 function | Uses 1 function

WP_REST_Widget_Types_Controller::get_item_schema()

Method: Retrieves the widget type’s schema, conforming to JSON Schema.

Source: wp-includes/rest-api/endpoints/class-wp-rest-widget-types-controller.php:380

Used by 1 function | Uses 1 function

WP_REST_Widget_Types_Controller::encode_form_data()

Method: An RPC-style endpoint which can be used by clients to turn user input in a widget admin form into an encoded instance object.

Source: wp-includes/rest-api/endpoints/class-wp-rest-widget-types-controller.php:453

Used by 0 functions | Uses 9 functions

WP_REST_Widget_Types_Controller::get_widget_preview()

Method: Returns the output of WP_Widget::widget() when called with the provided instance. Used by encode_form_data() to preview a widget.

Source: wp-includes/rest-api/endpoints/class-wp-rest-widget-types-controller.php:548

Used by 1 function | Uses 1 function

WP_REST_Widget_Types_Controller::get_widget_form()

Method: Returns the output of WP_Widget::form() when called with the provided instance. Used by encode_form_data() to preview a widget’s form.

Source: wp-includes/rest-api/endpoints/class-wp-rest-widget-types-controller.php:564

Used by 1 function | Uses 2 functions

WP_REST_Widget_Types_Controller::get_collection_params()

Method: Retrieves the query params for collections.

Source: wp-includes/rest-api/endpoints/class-wp-rest-widget-types-controller.php:666

Used by 1 function | Uses 0 functions

WP_REST_Widget_Types_Controller::get_widgets()

Method: Normalize array of widgets.

Source: wp-includes/rest-api/endpoints/class-wp-rest-widget-types-controller.php:228

Used by 2 functions | Uses 3 functions

WP_REST_Widget_Types_Controller::get_item()

Method: Retrieves a single widget type from the collection.

Source: wp-includes/rest-api/endpoints/class-wp-rest-widget-types-controller.php:276

Used by 0 functions | Uses 4 functions

WP_REST_Widget_Types_Controller::prepare_item_for_response()

Method: Prepares a widget type object for serialization.

Source: wp-includes/rest-api/endpoints/class-wp-rest-widget-types-controller.php:297

Used by 2 functions | Uses 6 functions

WP_REST_Widget_Types_Controller

Class: Core class to access widget types via the REST API.

Source: wp-includes/rest-api/endpoints/class-wp-rest-widget-types-controller.php:17

Used by 0 functions | Uses 1 function

WP_REST_Widget_Types_Controller::__construct()

Method: Constructor.

Source: wp-includes/rest-api/endpoints/class-wp-rest-widget-types-controller.php:24

Used by 1 function | Uses 0 functions

WP_REST_Widget_Types_Controller::register_routes()

Method: Registers the widget type routes.

Source: wp-includes/rest-api/endpoints/class-wp-rest-widget-types-controller.php:36

Used by 0 functions | Uses 4 functions

WP_REST_Widget_Types_Controller::get_items_permissions_check()

Method: Checks whether a given request has permission to read widget types.

Source: wp-includes/rest-api/endpoints/class-wp-rest-widget-types-controller.php:135

Used by 0 functions | Uses 1 function

WP_REST_Widget_Types_Controller::get_items()

Method: Retrieves the list of all widget types.

Source: wp-includes/rest-api/endpoints/class-wp-rest-widget-types-controller.php:147

Used by 0 functions | Uses 3 functions

WP_REST_Widget_Types_Controller::get_item_permissions_check()

Method: Checks if a given request has access to read a widget type.

Source: wp-includes/rest-api/endpoints/class-wp-rest-widget-types-controller.php:165

Used by 0 functions | Uses 3 functions

WP_REST_Widget_Types_Controller::check_read_permission()

Method: Checks whether the user can read widget types.

Source: wp-includes/rest-api/endpoints/class-wp-rest-widget-types-controller.php:186

Used by 2 functions | Uses 4 functions

WP_REST_Widget_Types_Controller::get_widget()

Method: Gets the details about the requested widget.

Source: wp-includes/rest-api/endpoints/class-wp-rest-widget-types-controller.php:208

Used by 2 functions | Uses 3 functions
  • About
  • News
  • Hosting
  • Donate
  • Swag
  • Documentation
  • Developers
  • Get Involved
  • Learn
  • Showcase
  • Plugins
  • Themes
  • Patterns
  • WordCamp
  • WordPress.TV
  • BuddyPress
  • bbPress
  • WordPress.com
  • Matt
  • Privacy
  • Public Code
WordPress.org
WordPress.org
  • Visit our Facebook page
  • Visit our Twitter account
  • Visit our Instagram account
  • Visit our LinkedIn account
Code is Poetry