[ Index ]

PHP Cross Reference of WordPress Trunk (Updated Daily)

title

Body

[close]

/wp-includes/ -> class-wp-oembed-controller.php (summary)

WP_oEmbed_Controller class, used to provide an oEmbed endpoint.

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

Defines 4 functions

  register_routes()
  get_item()
  get_proxy_item_permissions_check()
  get_proxy_item()

Functions
Functions that are not part of a class:

register_routes()   X-Ref
Register the oEmbed REST API route.


get_item( $request )   X-Ref
Callback for the embed API endpoint.

Returns the JSON object for the post.

param: WP_REST_Request $request Full data about the request.
return: array|WP_Error oEmbed response data or WP_Error on failure.

get_proxy_item_permissions_check()   X-Ref
Checks if current user can make a proxy oEmbed request.

return: true|WP_Error True if the request has read access, WP_Error object otherwise.

get_proxy_item( $request )   X-Ref
Callback for the proxy API endpoint.

Returns the JSON object for the proxied item.

param: WP_REST_Request $request Full data about the request.
return: object|WP_Error oEmbed response data or WP_Error on failure.



Generated: Sat Nov 23 20:47:33 2019 Cross-referenced by PHPXref 0.7