WordPress at a glance
function is not described

WP_oEmbed_Controller::get_proxy_item_permissions_check() public WP 4.8.0

Checks if current user can make a proxy oEmbed request.

{} It's a method of the class: WP_oEmbed_Controller{}

No Hooks.

Return

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

Usage

$WP_oEmbed_Controller = new WP_oEmbed_Controller();
$WP_oEmbed_Controller->get_proxy_item_permissions_check();

Changelog

Since 4.8.0 Introduced.

Code of WP_oEmbed_Controller::get_proxy_item_permissions_check() WP 5.7.2

<?php
public function get_proxy_item_permissions_check() {
	if ( ! current_user_can( 'edit_posts' ) ) {
		return new WP_Error( 'rest_forbidden', __( 'Sorry, you are not allowed to make proxied oEmbed requests.' ), array( 'status' => rest_authorization_required_code() ) );
	}
	return true;
}