<!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>[13098] trunk/wp-includes: Move deprecated pre-2.8 widget API to deprecated
.php.</title>
</head>
<body>
<div id="msg">
<dl>
<dt>Revision</dt> <dd><a href="http://trac.wordpress.org/changeset/13098">13098</a></dd>
<dt>Author</dt> <dd>nacin</dd>
<dt>Date</dt> <dd>2010-02-13 07:55:28 +0000 (Sat, 13 Feb 2010)</dd>
</dl>
<h3>Log Message</h3>
<pre>Move deprecated pre-2.8 widget API to deprecated.php. Deprecate register_sidebar_widget, unregister_sidebar_widget, register_widget_control, unregister_widget_control, in favor of their wp_* counterparts. See <a href="http://trac.wordpress.org/ticket/11388">#11388</a></pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkwpincludesdeprecatedphp">trunk/wp-includes/deprecated.php</a></li>
<li><a href="#trunkwpincludeswidgetsphp">trunk/wp-includes/widgets.php</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkwpincludesdeprecatedphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/deprecated.php (13097 => 13098)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/deprecated.php        2010-02-13 07:42:02 UTC (rev 13097)
+++ trunk/wp-includes/deprecated.php        2010-02-13 07:55:28 UTC (rev 13098)
</span><span class="lines">@@ -2191,4 +2191,120 @@
</span><span class="cx">         return esc_attr( $text );
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+/**
+ * Register widget for sidebar with backwards compatibility.
+ *
+ * Allows $name to be an array that accepts either three elements to grab the
+ * first element and the third for the name or just uses the first element of
+ * the array for the name.
+ *
+ * Passes to {@link wp_register_sidebar_widget()} after argument list and
+ * backwards compatibility is complete.
+ *
+ * @since 2.2.0
+ * @deprecated 2.8.0
+ * @deprecated Use wp_register_sidebar_widget()
+ * @see wp_register_sidebar_widget()
+ *
+ * @param string|int $name Widget ID.
+ * @param callback $output_callback Run when widget is called.
+ * @param string $classname Classname widget option.
+ * @param mixed $params,... Widget parameters.
+ */
+function register_sidebar_widget($name, $output_callback, $classname = '') {
+        _deprecated_function( __FUNCTION__, '2.8', 'wp_register_sidebar_widget()' );
+        // Compat
+        if ( is_array($name) ) {
+                if ( count($name) == 3 )
+                        $name = sprintf($name[0], $name[2]);
+                else
+                        $name = $name[0];
+        }
+
+        $id = sanitize_title($name);
+        $options = array();
+        if ( !empty($classname) && is_string($classname) )
+                $options['classname'] = $classname;
+        $params = array_slice(func_get_args(), 2);
+        $args = array($id, $name, $output_callback, $options);
+        if ( !empty($params) )
+                $args = array_merge($args, $params);
+
+        call_user_func_array('wp_register_sidebar_widget', $args);
+}
+
+/**
+ * Alias of {@link wp_unregister_sidebar_widget()}.
+ *
+ * @since 2.2.0
+ * @deprecated 2.8.0
+ * @deprecated Use wp_unregister_sidebar_widget()
+ * @see wp_unregister_sidebar_widget()
+ *
+ * @param int|string $id Widget ID.
+ */
+function unregister_sidebar_widget($id) {
+        _deprecated_function( __FUNCTION__, '2.8', 'wp_unregister_sidebar_widget()' );
+        return wp_unregister_sidebar_widget($id);
+}
+
+/**
+ * Registers widget control callback for customizing options.
+ *
+ * Allows $name to be an array that accepts either three elements to grab the
+ * first element and the third for the name or just uses the first element of
+ * the array for the name.
+ *
+ * Passes to {@link wp_register_widget_control()} after the argument list has
+ * been compiled.
+ *
+ * @since 2.2.0
+ * @deprecated 2.8.0
+ * @deprecated Use wp_register_widget_control()
+ * @see wp_register_widget_control()
+ *
+ * @param int|string $name Sidebar ID.
+ * @param callback $control_callback Widget control callback to display and process form.
+ * @param int $width Widget width.
+ * @param int $height Widget height.
+ */
+function register_widget_control($name, $control_callback, $width = '', $height = '') {
+        _deprecated_function( __FUNCTION__, '2.8', 'wp_register_widget_control()' );
+        // Compat
+        if ( is_array($name) ) {
+                if ( count($name) == 3 )
+                        $name = sprintf($name[0], $name[2]);
+                else
+                        $name = $name[0];
+        }
+
+        $id = sanitize_title($name);
+        $options = array();
+        if ( !empty($width) )
+                $options['width'] = $width;
+        if ( !empty($height) )
+                $options['height'] = $height;
+        $params = array_slice(func_get_args(), 4);
+        $args = array($id, $name, $control_callback, $options);
+        if ( !empty($params) )
+                $args = array_merge($args, $params);
+
+        call_user_func_array('wp_register_widget_control', $args);
+}
+
+/**
+ * Alias of {@link wp_unregister_widget_control()}.
+ *
+ * @since 2.2.0
+ * @deprecated 2.8.0
+ * @deprecated Use wp_unregister_widget_control()
+ * @see wp_unregister_widget_control()
+ *
+ * @param int|string $id Widget ID.
+ */
+function unregister_widget_control($id) {
+        _deprecated_function( __FUNCTION__, '2.8', 'wp_unregister_widget_control()' );
+        return wp_unregister_widget_control($id);
+}
+
</ins><span class="cx"> ?>
</span><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkwpincludeswidgetsphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/widgets.php (13097 => 13098)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/widgets.php        2010-02-13 07:42:02 UTC (rev 13097)
+++ trunk/wp-includes/widgets.php        2010-02-13 07:55:28 UTC (rev 13098)
</span><span class="lines">@@ -1171,114 +1171,6 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> /**
</span><del>- * Deprecated API
- */
-
-/**
- * Register widget for sidebar with backwards compatibility.
- *
- * Allows $name to be an array that accepts either three elements to grab the
- * first element and the third for the name or just uses the first element of
- * the array for the name.
- *
- * Passes to {@link wp_register_sidebar_widget()} after argument list and
- * backwards compatibility is complete.
- *
- * @since 2.2.0
- * @uses wp_register_sidebar_widget() Passes the compiled arguments.
- *
- * @param string|int $name Widget ID.
- * @param callback $output_callback Run when widget is called.
- * @param string $classname Classname widget option.
- * @param mixed $params,... Widget parameters.
- */
-function register_sidebar_widget($name, $output_callback, $classname = '') {
-        // Compat
-        if ( is_array($name) ) {
-                if ( count($name) == 3 )
-                        $name = sprintf($name[0], $name[2]);
-                else
-                        $name = $name[0];
-        }
-
-        $id = sanitize_title($name);
-        $options = array();
-        if ( !empty($classname) && is_string($classname) )
-                $options['classname'] = $classname;
-        $params = array_slice(func_get_args(), 2);
-        $args = array($id, $name, $output_callback, $options);
-        if ( !empty($params) )
-                $args = array_merge($args, $params);
-
-        call_user_func_array('wp_register_sidebar_widget', $args);
-}
-
-/**
- * Alias of {@link wp_unregister_sidebar_widget()}.
- *
- * @see wp_unregister_sidebar_widget()
- *
- * @since 2.2.0
- *
- * @param int|string $id Widget ID.
- */
-function unregister_sidebar_widget($id) {
-        return wp_unregister_sidebar_widget($id);
-}
-
-/**
- * Registers widget control callback for customizing options.
- *
- * Allows $name to be an array that accepts either three elements to grab the
- * first element and the third for the name or just uses the first element of
- * the array for the name.
- *
- * Passes to {@link wp_register_widget_control()} after the argument list has
- * been compiled.
- *
- * @since 2.2.0
- *
- * @param int|string $name Sidebar ID.
- * @param callback $control_callback Widget control callback to display and process form.
- * @param int $width Widget width.
- * @param int $height Widget height.
- */
-function register_widget_control($name, $control_callback, $width = '', $height = '') {
-        // Compat
-        if ( is_array($name) ) {
-                if ( count($name) == 3 )
-                        $name = sprintf($name[0], $name[2]);
-                else
-                        $name = $name[0];
-        }
-
-        $id = sanitize_title($name);
-        $options = array();
-        if ( !empty($width) )
-                $options['width'] = $width;
-        if ( !empty($height) )
-                $options['height'] = $height;
-        $params = array_slice(func_get_args(), 4);
-        $args = array($id, $name, $control_callback, $options);
-        if ( !empty($params) )
-                $args = array_merge($args, $params);
-
-        call_user_func_array('wp_register_widget_control', $args);
-}
-
-/**
- * Alias of {@link wp_unregister_widget_control()}.
- *
- * @since 2.2.0
- * @see wp_unregister_widget_control()
- *
- * @param int|string $id Widget ID.
- */
-function unregister_widget_control($id) {
-        return wp_unregister_widget_control($id);
-}
-
-/**
</del><span class="cx"> * Output an arbitrary widget as a template tag
</span><span class="cx"> *
</span><span class="cx"> * @since 2.8
</span></span></pre>
</div>
</div>
</body>
</html>