Revert editing of video embed parameters in the media modal, [31620] and [31626] for now. Plan on revisiting in 4.3.

Props iseulde. Fixes #31139, fixes #32006.

git-svn-id: https://develop.svn.wordpress.org/trunk@32258 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Ozz
2015-04-21 22:40:23 +00:00
parent 312edcbc9d
commit 925682e2d1
7 changed files with 21 additions and 129 deletions

View File

@@ -2714,21 +2714,14 @@ function wp_ajax_parse_embed() {
}
$shortcode = wp_unslash( $_POST['shortcode'] );
preg_match( '/' . get_shortcode_regex() . '/s', $shortcode, $matches );
$atts = shortcode_parse_atts( $matches[3] );
if ( ! empty( $matches[5] ) ) {
$url = $matches[5];
} elseif ( ! empty( $atts['src'] ) ) {
$url = $atts['src'];
}
$url = str_replace( '[embed]', '', str_replace( '[/embed]', '', $shortcode ) );
$parsed = false;
setup_postdata( $post );
$wp_embed->return_false_on_fail = true;
if ( is_ssl() && 0 === strpos( $url, 'http://' ) ) {
if ( is_ssl() && preg_match( '%^\\[embed[^\\]]*\\]http://%i', $shortcode ) ) {
// Admin is ssl and the user pasted non-ssl URL.
// Check if the provider supports ssl embeds and use that for the preview.
$ssl_shortcode = preg_replace( '%^(\\[embed[^\\]]*\\])http://%i', '$1https://', $shortcode );
@@ -2781,8 +2774,7 @@ function wp_ajax_parse_embed() {
}
wp_send_json_success( array(
'body' => $parsed,
'attr' => $wp_embed->last_attr
'body' => $parsed
) );
}