Make WordPress Core

Ticket #36304: 36304.diff

File 36304.diff, 3.1 KB (added by swissspidy, 8 years ago)
  • src/wp-includes/deprecated.php

    diff --git src/wp-includes/deprecated.php src/wp-includes/deprecated.php
    index ae1dce5..0949f0b 100644
    function popuplinks( $text ) { 
    37403740        $text = preg_replace('/<a (.+?)>/i', "<a $1 target='_blank' rel='external'>", $text);
    37413741        return $text;
    37423742}
     3743
     3744/**
     3745 * The Google Video embed handler callback.
     3746 *
     3747 * Deprecated function that previously assisted in turning Google Video URLs
     3748 * into embeds but that service has since been shut down.
     3749 *
     3750 * @since 2.9.0
     3751 * @deprecated 4.6.0
     3752 *
     3753 * @return string An empty string.
     3754 */
     3755function wp_embed_handler_googlevideo( $matches, $attr, $url, $rawattr ) {
     3756        _deprecated_function( __FUNCTION__, '4.6.0' );
     3757
     3758        return '';
     3759}
  • src/wp-includes/embed.php

    diff --git src/wp-includes/embed.php src/wp-includes/embed.php
    index 785b5f3..3086842 100644
    function wp_maybe_load_embeds() { 
    175175
    176176        wp_embed_register_handler( 'youtube_embed_url', '#https?://(www.)?youtube\.com/(?:v|embed)/([^/]+)#i', 'wp_embed_handler_youtube' );
    177177
    178         wp_embed_register_handler( 'googlevideo', '#http://video\.google\.([A-Za-z.]{2,5})/videoplay\?docid=([\d-]+)(.*?)#i', 'wp_embed_handler_googlevideo' );
    179 
    180178        /**
    181179         * Filters the audio embed handler callback.
    182180         *
    function wp_maybe_load_embeds() { 
    197195}
    198196
    199197/**
    200  * The Google Video embed handler callback.
    201  *
    202  * Google Video does not support oEmbed.
    203  *
    204  * @see WP_Embed::register_handler()
    205  * @see WP_Embed::shortcode()
    206  *
    207  * @param array  $matches The RegEx matches from the provided regex when calling wp_embed_register_handler().
    208  * @param array  $attr    Embed attributes.
    209  * @param string $url     The original URL that was matched by the regex.
    210  * @param array  $rawattr The original unmodified attributes.
    211  * @return string The embed HTML.
    212  */
    213 function wp_embed_handler_googlevideo( $matches, $attr, $url, $rawattr ) {
    214         // If the user supplied a fixed width AND height, use it
    215         if ( !empty($rawattr['width']) && !empty($rawattr['height']) ) {
    216                 $width  = (int) $rawattr['width'];
    217                 $height = (int) $rawattr['height'];
    218         } else {
    219                 list( $width, $height ) = wp_expand_dimensions( 425, 344, $attr['width'], $attr['height'] );
    220         }
    221 
    222         /**
    223          * Filters the Google Video embed output.
    224          *
    225          * @since 2.9.0
    226          *
    227          * @param string $html    Google Video HTML embed markup.
    228          * @param array  $matches The RegEx matches from the provided regex.
    229          * @param array  $attr    An array of embed attributes.
    230          * @param string $url     The original URL that was matched by the regex.
    231          * @param array  $rawattr The original unmodified attributes.
    232          */
    233         return apply_filters( 'embed_googlevideo', '<embed type="application/x-shockwave-flash" src="http://video.google.com/googleplayer.swf?docid=' . esc_attr($matches[2]) . '&amp;hl=en&amp;fs=true" style="width:' . esc_attr($width) . 'px;height:' . esc_attr($height) . 'px" allowFullScreen="true" allowScriptAccess="always" />', $matches, $attr, $url, $rawattr );
    234 }
    235 
    236 /**
    237198 * YouTube iframe embed handler callback.
    238199 *
    239200 * Catches YouTube iframe embed URLs that are not parsable by oEmbed but can be translated into a URL that is.