Changeset 31620 for trunk/src/wp-admin/includes/ajax-actions.php
- Timestamp:
- 03/05/2015 05:59:10 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/ajax-actions.php
r31619 r31620 2709 2709 2710 2710 $shortcode = wp_unslash( $_POST['shortcode'] ); 2711 $url = str_replace( '[embed]', '', str_replace( '[/embed]', '', $shortcode ) ); 2711 2712 preg_match( '/' . get_shortcode_regex() . '/s', $shortcode, $matches ); 2713 $atts = shortcode_parse_atts( $matches[3] ); 2714 if ( ! empty( $atts[5] ) ) { 2715 $url = $atts[5]; 2716 } elseif ( ! empty( $atts['src'] ) ) { 2717 $url = $atts['src']; 2718 } 2719 2712 2720 $parsed = false; 2713 2721 setup_postdata( $post ); … … 2715 2723 $wp_embed->return_false_on_fail = true; 2716 2724 2717 if ( is_ssl() && preg_match( '%^\\[embed[^\\]]*\\]http://%i', $shortcode) ) {2725 if ( is_ssl() && 0 === strpos( $url, 'http://' ) ) { 2718 2726 // Admin is ssl and the user pasted non-ssl URL. 2719 2727 // Check if the provider supports ssl embeds and use that for the preview. … … 2768 2776 2769 2777 wp_send_json_success( array( 2770 'body' => $parsed 2778 'body' => $parsed, 2779 'attr' => $wp_embed->last_attr 2771 2780 ) ); 2772 2781 }
Note: See TracChangeset
for help on using the changeset viewer.