<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" /><style type="text/css"><!--
#msg dl { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fc0 solid; padding: 6px; }
#msg ul, pre { overflow: auto; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<title>[17751] trunk/wp-includes: Remove default-embeds.php.</title>
</head>
<body>

<div id="msg">
<dl>
<dt>Revision</dt> <dd><a href="http://trac.wordpress.org/changeset/17751">17751</a></dd>
<dt>Author</dt> <dd>nacin</dd>
<dt>Date</dt> <dd>2011-04-28 17:03:23 +0000 (Thu, 28 Apr 2011)</dd>
</dl>

<h3>Log Message</h3>
<pre>Remove default-embeds.php. fixes <a href="http://trac.wordpress.org/ticket/17112">#17112</a>.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkwpincludesfunctionsphp">trunk/wp-includes/functions.php</a></li>
<li><a href="#trunkwpincludesmediaphp">trunk/wp-includes/media.php</a></li>
</ul>

<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkwpincludesdefaultembedsphp">trunk/wp-includes/default-embeds.php</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkwpincludesdefaultembedsphp"></a>
<div class="delfile"><h4>Deleted: trunk/wp-includes/default-embeds.php (17750 => 17751)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/default-embeds.php        2011-04-28 16:51:12 UTC (rev 17750)
+++ trunk/wp-includes/default-embeds.php        2011-04-28 17:03:23 UTC (rev 17751)
</span><span class="lines">@@ -1,35 +0,0 @@
</span><del>-&lt;?php
-
-/**
- * Default Embed Handlers
- *
- * @package WordPress
- * @subpackage Embeds
- */
-
-/**
- * The Google Video embed handler callback. Google Video does not support oEmbed.
- *
- * @see WP_Embed::register_handler()
- * @see WP_Embed::shortcode()
- *
- * @param array $matches The regex matches from the provided regex when calling {@link wp_embed_register_handler()}.
- * @param array $attr Embed attributes.
- * @param string $url The original URL that was matched by the regex.
- * @param array $rawattr The original unmodified attributes.
- * @return string The embed HTML.
- */
-function wp_embed_handler_googlevideo( $matches, $attr, $url, $rawattr ) {
-        // If the user supplied a fixed width AND height, use it
-        if ( !empty($rawattr['width']) &amp;&amp; !empty($rawattr['height']) ) {
-                $width  = (int) $rawattr['width'];
-                $height = (int) $rawattr['height'];
-        } else {
-                list( $width, $height ) = wp_expand_dimensions( 425, 344, $attr['width'], $attr['height'] );
-        }
-
-        return apply_filters( 'embed_googlevideo', '&lt;embed type=&quot;application/x-shockwave-flash&quot; src=&quot;http://video.google.com/googleplayer.swf?docid=' . esc_attr($matches[2]) . '&amp;amp;hl=en&amp;amp;fs=true&quot; style=&quot;width:' . esc_attr($width) . 'px;height:' . esc_attr($height) . 'px&quot; allowFullScreen=&quot;true&quot; allowScriptAccess=&quot;always&quot; /&gt;', $matches, $attr, $url, $rawattr );
-}
-wp_embed_register_handler( 'googlevideo', '#http://video\.google\.([A-Za-z.]{2,5})/videoplay\?docid=([\d-]+)(.*?)#i', 'wp_embed_handler_googlevideo' );
-
-?&gt;
</del><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkwpincludesfunctionsphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/functions.php (17750 => 17751)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/functions.php        2011-04-28 16:51:12 UTC (rev 17750)
+++ trunk/wp-includes/functions.php        2011-04-28 17:03:23 UTC (rev 17751)
</span><span class="lines">@@ -3197,20 +3197,6 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> /**
</span><del>- * Determines if default embed handlers should be loaded.
- *
- * Checks to make sure that the embeds library hasn't already been loaded. If
- * it hasn't, then it will load the embeds library.
- *
- * @since 2.9.0
- */
-function wp_maybe_load_embeds() {
-        if ( ! apply_filters('load_default_embeds', true) )
-                return;
-        require_once( ABSPATH . WPINC . '/default-embeds.php' );
-}
-
-/**
</del><span class="cx">  * Determines if Widgets library should be loaded.
</span><span class="cx">  *
</span><span class="cx">  * Checks to make sure that the widgets library hasn't already been loaded. If
</span></span></pre></div>
<a id="trunkwpincludesmediaphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/media.php (17750 => 17751)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/media.php        2011-04-28 16:51:12 UTC (rev 17750)
+++ trunk/wp-includes/media.php        2011-04-28 17:03:23 UTC (rev 17751)
</span><span class="lines">@@ -1398,4 +1398,44 @@
</span><span class="cx">         require_once( ABSPATH . WPINC . '/class-oembed.php' );
</span><span class="cx">         $oembed = _wp_oembed_get_object();
</span><span class="cx">         $oembed-&gt;providers[$format] = array( $provider, $regex );
</span><del>-}
</del><span class="cx">\ No newline at end of file
</span><ins>+}
+
+/**
+ * Determines if default embed handlers should be loaded.
+ *
+ * Checks to make sure that the embeds library hasn't already been loaded. If
+ * it hasn't, then it will load the embeds library.
+ *
+ * @since 2.9.0
+ */
+function wp_maybe_load_embeds() {
+        if ( ! apply_filters( 'load_default_embeds', true ) )
+                return;
+        wp_embed_register_handler( 'googlevideo', '#http://video\.google\.([A-Za-z.]{2,5})/videoplay\?docid=([\d-]+)(.*?)#i', 'wp_embed_handler_googlevideo' );
+}
+
+/**
+ * The Google Video embed handler callback. Google Video does not support oEmbed.
+ *
+ * @see WP_Embed::register_handler()
+ * @see WP_Embed::shortcode()
+ *
+ * @param array $matches The regex matches from the provided regex when calling {@link wp_embed_register_handler()}.
+ * @param array $attr Embed attributes.
+ * @param string $url The original URL that was matched by the regex.
+ * @param array $rawattr The original unmodified attributes.
+ * @return string The embed HTML.
+ */
+function wp_embed_handler_googlevideo( $matches, $attr, $url, $rawattr ) {
+        // If the user supplied a fixed width AND height, use it
+        if ( !empty($rawattr['width']) &amp;&amp; !empty($rawattr['height']) ) {
+                $width  = (int) $rawattr['width'];
+                $height = (int) $rawattr['height'];
+        } else {
+                list( $width, $height ) = wp_expand_dimensions( 425, 344, $attr['width'], $attr['height'] );
+        }
+
+        return apply_filters( 'embed_googlevideo', '&lt;embed type=&quot;application/x-shockwave-flash&quot; src=&quot;http://video.google.com/googleplayer.swf?docid=' . esc_attr($matches[2]) . '&amp;amp;hl=en&amp;amp;fs=true&quot; style=&quot;width:' . esc_attr($width) . 'px;height:' . esc_attr($height) . 'px&quot; allowFullScreen=&quot;true&quot; allowScriptAccess=&quot;always&quot; /&gt;', $matches, $attr, $url, $rawattr );
+}
+
+?&gt;
</ins><span class="cx">\ No newline at end of file
</span></span></pre>
</div>
</div>

</body>
</html>