Changeset 32258 for trunk/src/wp-admin/includes/ajax-actions.php
- Timestamp:
- 04/21/2015 10:40:23 PM (11 years ago)
- File:
-
- 1 edited
-
trunk/src/wp-admin/includes/ajax-actions.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/ajax-actions.php
r32079 r32258 2715 2715 2716 2716 $shortcode = wp_unslash( $_POST['shortcode'] ); 2717 2718 preg_match( '/' . get_shortcode_regex() . '/s', $shortcode, $matches ); 2719 $atts = shortcode_parse_atts( $matches[3] ); 2720 if ( ! empty( $matches[5] ) ) { 2721 $url = $matches[5]; 2722 } elseif ( ! empty( $atts['src'] ) ) { 2723 $url = $atts['src']; 2724 } 2717 $url = str_replace( '[embed]', '', str_replace( '[/embed]', '', $shortcode ) ); 2725 2718 2726 2719 $parsed = false; … … 2729 2722 $wp_embed->return_false_on_fail = true; 2730 2723 2731 if ( is_ssl() && 0 === strpos( $url, 'http://') ) {2724 if ( is_ssl() && preg_match( '%^\\[embed[^\\]]*\\]http://%i', $shortcode ) ) { 2732 2725 // Admin is ssl and the user pasted non-ssl URL. 2733 2726 // Check if the provider supports ssl embeds and use that for the preview. … … 2782 2775 2783 2776 wp_send_json_success( array( 2784 'body' => $parsed, 2785 'attr' => $wp_embed->last_attr 2777 'body' => $parsed 2786 2778 ) ); 2787 2779 }
Note: See TracChangeset
for help on using the changeset viewer.