WP_oEmbed_Controller::get_proxy_item_permissions_check

Advertisement

Summery Summery

Checks if current user can make a proxy oEmbed request.

Syntax Syntax

WP_oEmbed_Controller::get_proxy_item_permissions_check()

Return Return

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

Source Source

File: wp-includes/class-wp-oembed-controller.php

	 *
	 * @return true|WP_Error True if the request has read access, WP_Error object otherwise.
	 */
	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() ) );

Advertisement

Changelog Changelog

Changelog
Version Description
4.8.0 Introduced.

Advertisement

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

What are you looking for?