Embeds: Add the `allow_insecure_embeds` filter.
This allows a site to disable non-SSL embeds. Fixes #34588. Built from https://develop.svn.wordpress.org/trunk@35640 git-svn-id: http://core.svn.wordpress.org/trunk@35604 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
45658705f3
commit
3783e497c6
|
@ -143,6 +143,18 @@ class WP_Embed {
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Optionally allow or block non-SSL embeds.
|
||||||
|
*
|
||||||
|
* @since 4.4.0
|
||||||
|
*
|
||||||
|
* @param bool $allowed Flag to determine if non-SSL embeds should be allowed. Default true.
|
||||||
|
* @param string $url The URL being embedded.
|
||||||
|
*/
|
||||||
|
if ( 0 !== strpos( $url, 'https://' ) && ! apply_filters( 'allow_insecure_embeds', true, $url ) ) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
$rawattr = $attr;
|
$rawattr = $attr;
|
||||||
$attr = wp_parse_args( $attr, wp_embed_defaults( $url ) );
|
$attr = wp_parse_args( $attr, wp_embed_defaults( $url ) );
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '4.4-beta4-35639';
|
$wp_version = '4.4-beta4-35640';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
Loading…
Reference in New Issue