Make WordPress Core


Ignore:
Timestamp:
05/11/2017 06:18:00 PM (6 years ago)
Author:
jnylen0
Message:

REST API: Add endpoint for proxying requests to external oEmbed providers.

This endpoint is a prerequisite for the media widgets work (see https://github.com/xwp/wp-core-media-widgets).

Also use the new endpoint in the media modal instead of the parse-embed AJAX action.

Props westonruter, timmydcrawford, swissspidy, jnylen0.
Fixes #40450.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/media.php

    r40573 r40628  
    34153415        'nonce'     => array(
    34163416            'sendToEditor' => wp_create_nonce( 'media-send-to-editor' ),
     3417            'wpRestApi'    => wp_create_nonce( 'wp_rest' ),
    34173418        ),
    34183419        'post'    => array(
     
    34243425            'video' => ( $show_video_playlist ) ? 1 : 0,
    34253426        ),
     3427        'oEmbedProxyUrl' => rest_url( 'oembed/1.0/proxy' ),
    34263428        'embedExts'    => $exts,
    34273429        'embedMimes'   => $ext_mimes,
Note: See TracChangeset for help on using the changeset viewer.