WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru
функция не описана

WP_oEmbed_Controller::get_proxy_item_permissions_check() WP 4.8.0

Checks if current user can make a proxy oEmbed request.

Это метод класса: WP_oEmbed_Controller

Хуков нет.


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


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

Код WP oEmbed Controller::get proxy item permissions check: wp-includes/class-wp-oembed-controller.php WP 5.2

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;