<!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>[12525] trunk/wp-includes: Refresh deprecated bookmark functions.</title>
</head>
<body>

<div id="msg">
<dl>
<dt>Revision</dt> <dd><a href="http://trac.wordpress.org/changeset/12525">12525</a></dd>
<dt>Author</dt> <dd>ryan</dd>
<dt>Date</dt> <dd>2009-12-23 18:49:22 +0000 (Wed, 23 Dec 2009)</dd>
</dl>

<h3>Log Message</h3>
<pre>Refresh deprecated bookmark functions. Props filosofo. fixes <a href="http://trac.wordpress.org/ticket/10920">#10920</a></pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkwpincludesbookmarktemplatephp">trunk/wp-includes/bookmark-template.php</a></li>
<li><a href="#trunkwpincludesdeprecatedphp">trunk/wp-includes/deprecated.php</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkwpincludesbookmarktemplatephp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/bookmark-template.php (12524 => 12525)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/bookmark-template.php        2009-12-23 18:39:31 UTC (rev 12524)
+++ trunk/wp-includes/bookmark-template.php        2009-12-23 18:49:22 UTC (rev 12525)
</span><span class="lines">@@ -153,6 +153,8 @@
</span><span class="cx">  *                formatted bookmarks.
</span><span class="cx">  * 'categorize' - Default is 1 (integer). Whether to show links listed by
</span><span class="cx">  *                category (default) or show links in one column.
</span><ins>+ * 'show_description' - Default is 0 (integer). Whether to show the description
+ *                of the bookmark.
</ins><span class="cx">  *
</span><span class="cx">  * These options define how the Category name will appear before the category
</span><span class="cx">  * links are displayed, if 'categorize' is 1. If 'categorize' is 0, then it will
</span></span></pre></div>
<a id="trunkwpincludesdeprecatedphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/deprecated.php (12524 => 12525)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/deprecated.php        2009-12-23 18:39:31 UTC (rev 12524)
+++ trunk/wp-includes/deprecated.php        2009-12-23 18:49:22 UTC (rev 12525)
</span><span class="lines">@@ -471,23 +471,30 @@
</span><span class="cx">  * Gets the links associated with the named category.
</span><span class="cx">  *
</span><span class="cx">  * @since 1.0.1
</span><del>- * @deprecated Use wp_get_links()
- * @see wp_get_links()
</del><ins>+ * @deprecated Use wp_list_bookmarks()
+ * @see wp_list_bookmarks()
</ins><span class="cx">  *
</span><span class="cx">  * @param string $category The category to use.
</span><span class="cx">  * @param string $args
</span><span class="cx">  * @return bool|null
</span><span class="cx">  */
</span><span class="cx"> function wp_get_linksbyname($category, $args = '') {
</span><del>-        _deprecated_function(__FUNCTION__, '0.0', 'wp_get_links()');
</del><ins>+        _deprecated_function(__FUNCTION__, '0.0', 'wp_list_bookmarks()');
</ins><span class="cx"> 
</span><del>-        $cat = get_term_by('name', $category, 'link_category');
-        if ( !$cat )
-                return false;
-        $cat_id = $cat-&gt;term_id;
</del><ins>+        $defaults = array(
+                'after' =&gt; '&lt;br /&gt;',
+                'before' =&gt; '',
+                'categorize' =&gt; 0,
+                'category_after' =&gt; '',
+                'category_before' =&gt; '',
+                'category_name' =&gt; $category,
+                'show_description' =&gt; 1,
+                'title_li' =&gt; '',
+        );
+        
+        $r = wp_parse_args( $args, $defaults );
</ins><span class="cx"> 
</span><del>-        $args = add_query_arg('category', $cat_id, $args);
-        wp_get_links($args);
</del><ins>+        return wp_list_bookmarks($r);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> /**
</span><span class="lines">@@ -927,7 +934,7 @@
</span><span class="cx">  * @return null|string
</span><span class="cx">  */
</span><span class="cx"> function wp_get_links($args = '') {
</span><del>-        _deprecated_function(__FUNCTION__, '0.0', 'get_bookmarks()');
</del><ins>+        _deprecated_function(__FUNCTION__, '0.0', 'wp_list_bookmarks()');
</ins><span class="cx"> 
</span><span class="cx">         if ( strpos( $args, '=' ) === false ) {
</span><span class="cx">                 $cat_id = $args;
</span><span class="lines">@@ -935,18 +942,24 @@
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         $defaults = array(
</span><del>-                'category' =&gt; -1, 'before' =&gt; '',
-                'after' =&gt; '&lt;br /&gt;', 'between' =&gt; ' ',
-                'show_images' =&gt; true, 'orderby' =&gt; 'name',
-                'show_description' =&gt; true, 'show_rating' =&gt; false,
-                'limit' =&gt; -1, 'show_updated' =&gt; true,
-                'echo' =&gt; true
</del><ins>+                'after' =&gt; '&lt;br /&gt;', 
+                'before' =&gt; '',
+                'between' =&gt; ' ',
+                'categorize' =&gt; 0,
+                'category' =&gt; '', 
+                'echo' =&gt; true,
+                'limit' =&gt; -1, 
+                'orderby' =&gt; 'name',
+                'show_description' =&gt; true, 
+                'show_images' =&gt; true, 
+                'show_rating' =&gt; false,
+                'show_updated' =&gt; true,
+                'title_li' =&gt; '',
</ins><span class="cx">         );
</span><span class="cx"> 
</span><span class="cx">         $r = wp_parse_args( $args, $defaults );
</span><del>-        extract( $r, EXTR_SKIP );
-
-        return get_links($category, $before, $after, $between, $show_images, $orderby, $show_description, $show_rating, $limit, $show_updated, $echo);
</del><ins>+        
+        return wp_list_bookmarks($r);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> /**
</span></span></pre>
</div>
</div>

</body>
</html>