mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 22:30:04 +00:00
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:
@@ -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
|
||||
) );
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user