Add VideoPress as a trusted oEmbed provider.

Fixes #34031
Props kraftbj


git-svn-id: https://develop.svn.wordpress.org/trunk@34785 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
John Blackbourn 2015-10-02 23:19:18 +00:00
parent 4703e75f31
commit 337b94a0a5

View File

@ -33,6 +33,7 @@ class WP_oEmbed {
* @since 2.9.0 * @since 2.9.0
*/ */
public function __construct() { public function __construct() {
$host = urlencode( home_url() );
$providers = array( $providers = array(
'#http://((m|www)\.)?youtube\.com/watch.*#i' => array( 'http://www.youtube.com/oembed', true ), '#http://((m|www)\.)?youtube\.com/watch.*#i' => array( 'http://www.youtube.com/oembed', true ),
'#https://((m|www)\.)?youtube\.com/watch.*#i' => array( 'http://www.youtube.com/oembed?scheme=https', true ), '#https://((m|www)\.)?youtube\.com/watch.*#i' => array( 'http://www.youtube.com/oembed?scheme=https', true ),
@ -74,6 +75,7 @@ class WP_oEmbed {
'#https?://kck\.st/.*#i' => array( 'https://www.kickstarter.com/services/oembed', true ), '#https?://kck\.st/.*#i' => array( 'https://www.kickstarter.com/services/oembed', true ),
'#https?://cloudup\.com/.*#i' => array( 'https://cloudup.com/oembed', true ), '#https?://cloudup\.com/.*#i' => array( 'https://cloudup.com/oembed', true ),
'#https?://(www\.)?reverbnation\.com/.*#i' => array( 'https://www.reverbnation.com/oembed', true ), '#https?://(www\.)?reverbnation\.com/.*#i' => array( 'https://www.reverbnation.com/oembed', true ),
'#https?://videopress.com/v/.*#' => array( 'https://public-api.wordpress.com/oembed/1.0/?for=' . $host, true ),
); );
if ( ! empty( self::$early_providers['add'] ) ) { if ( ! empty( self::$early_providers['add'] ) ) {
@ -139,6 +141,7 @@ class WP_oEmbed {
* | Kickstarter | kck.st | Yes | 4.2.0 | * | Kickstarter | kck.st | Yes | 4.2.0 |
* | Cloudup | cloudup.com | Yes | 4.4.0 | * | Cloudup | cloudup.com | Yes | 4.4.0 |
* | ReverbNation | reverbnation.com | Yes | 4.4.0 | * | ReverbNation | reverbnation.com | Yes | 4.4.0 |
* | VideoPress | videopress.com | Yes | 4.4.0 |
* *
* No longer supported providers: * No longer supported providers:
* *