<!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>[12587] trunk: Use _deprecated_argument() in get_bloginfo() and then don'
 t pass deprecated argument to get_bloginfo().</title>
</head>
<body>

<div id="msg">
<dl>
<dt>Revision</dt> <dd><a href="http://trac.wordpress.org/changeset/12587">12587</a></dd>
<dt>Author</dt> <dd>westi</dd>
<dt>Date</dt> <dd>2009-12-30 17:05:02 +0000 (Wed, 30 Dec 2009)</dd>
</dl>

<h3>Log Message</h3>
<pre>Use _deprecated_argument() in get_bloginfo() and then don't pass deprecated argument to get_bloginfo(). Fixes <a href="http://trac.wordpress.org/ticket/11652">#11652</a> props nacin.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkwpappphp">trunk/wp-app.php</a></li>
<li><a href="#trunkwpincludesfeedatomcommentsphp">trunk/wp-includes/feed-atom-comments.php</a></li>
<li><a href="#trunkwpincludesfeedatomphp">trunk/wp-includes/feed-atom.php</a></li>
<li><a href="#trunkwpincludesgeneraltemplatephp">trunk/wp-includes/general-template.php</a></li>
<li><a href="#trunkwpincludeslinktemplatephp">trunk/wp-includes/link-template.php</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkwpappphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-app.php (12586 => 12587)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-app.php        2009-12-30 16:54:28 UTC (rev 12586)
+++ trunk/wp-app.php        2009-12-30 17:05:02 UTC (rev 12587)
</span><span class="lines">@@ -371,7 +371,7 @@
</span><span class="cx">                 if( !current_user_can( 'edit_posts' ) )
</span><span class="cx">                         $this-&gt;auth_required( __( 'Sorry, you do not have the right to access this blog.' ) );
</span><span class="cx"> 
</span><del>-                $home = esc_attr(get_bloginfo_rss('home'));
</del><ins>+                $home = esc_attr(get_bloginfo_rss('url'));
</ins><span class="cx"> 
</span><span class="cx">                 $categories = &quot;&quot;;
</span><span class="cx">                 $cats = get_categories(array('hierarchical' =&gt; 0, 'hide_empty' =&gt; 0));
</span></span></pre></div>
<a id="trunkwpincludesfeedatomcommentsphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/feed-atom-comments.php (12586 => 12587)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/feed-atom-comments.php        2009-12-30 16:54:28 UTC (rev 12586)
+++ trunk/wp-includes/feed-atom-comments.php        2009-12-30 17:05:02 UTC (rev 12587)
</span><span class="lines">@@ -36,7 +36,7 @@
</span><span class="cx">         &lt;link rel=&quot;self&quot; type=&quot;application/atom+xml&quot; href=&quot;&lt;?php echo get_search_comments_feed_link('', 'atom'); ?&gt;&quot; /&gt;
</span><span class="cx">         &lt;id&gt;&lt;?php echo get_search_comments_feed_link('', 'atom'); ?&gt;&lt;/id&gt;
</span><span class="cx"> &lt;?php } else { ?&gt;
</span><del>-        &lt;link rel=&quot;alternate&quot; type=&quot;&lt;?php bloginfo_rss('html_type'); ?&gt;&quot; href=&quot;&lt;?php bloginfo_rss('home'); ?&gt;&quot; /&gt;
</del><ins>+        &lt;link rel=&quot;alternate&quot; type=&quot;&lt;?php bloginfo_rss('html_type'); ?&gt;&quot; href=&quot;&lt;?php bloginfo_rss('url'); ?&gt;&quot; /&gt;
</ins><span class="cx">         &lt;link rel=&quot;self&quot; type=&quot;application/atom+xml&quot; href=&quot;&lt;?php bloginfo_rss('comments_atom_url'); ?&gt;&quot; /&gt;
</span><span class="cx">         &lt;id&gt;&lt;?php bloginfo_rss('comments_atom_url'); ?&gt;&lt;/id&gt;
</span><span class="cx"> &lt;?php } ?&gt;
</span></span></pre></div>
<a id="trunkwpincludesfeedatomphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/feed-atom.php (12586 => 12587)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/feed-atom.php        2009-12-30 16:54:28 UTC (rev 12586)
+++ trunk/wp-includes/feed-atom.php        2009-12-30 17:05:02 UTC (rev 12587)
</span><span class="lines">@@ -13,7 +13,7 @@
</span><span class="cx">   xmlns=&quot;http://www.w3.org/2005/Atom&quot;
</span><span class="cx">   xmlns:thr=&quot;http://purl.org/syndication/thread/1.0&quot;
</span><span class="cx">   xml:lang=&quot;&lt;?php echo get_option('rss_language'); ?&gt;&quot;
</span><del>-  xml:base=&quot;&lt;?php bloginfo_rss('home') ?&gt;/wp-atom.php&quot;
</del><ins>+  xml:base=&quot;&lt;?php bloginfo_rss('url') ?&gt;/wp-atom.php&quot;
</ins><span class="cx">   &lt;?php do_action('atom_ns'); ?&gt;
</span><span class="cx">  &gt;
</span><span class="cx">         &lt;title type=&quot;text&quot;&gt;&lt;?php bloginfo_rss('name'); wp_title_rss(); ?&gt;&lt;/title&gt;
</span><span class="lines">@@ -22,7 +22,7 @@
</span><span class="cx">         &lt;updated&gt;&lt;?php echo mysql2date('Y-m-d\TH:i:s\Z', get_lastpostmodified('GMT'), false); ?&gt;&lt;/updated&gt;
</span><span class="cx">         &lt;?php the_generator( 'atom' ); ?&gt;
</span><span class="cx"> 
</span><del>-        &lt;link rel=&quot;alternate&quot; type=&quot;text/html&quot; href=&quot;&lt;?php bloginfo_rss('home') ?&gt;&quot; /&gt;
</del><ins>+        &lt;link rel=&quot;alternate&quot; type=&quot;text/html&quot; href=&quot;&lt;?php bloginfo_rss('url') ?&gt;&quot; /&gt;
</ins><span class="cx">         &lt;id&gt;&lt;?php bloginfo('atom_url'); ?&gt;&lt;/id&gt;
</span><span class="cx">         &lt;link rel=&quot;self&quot; type=&quot;application/atom+xml&quot; href=&quot;&lt;?php self_link(); ?&gt;&quot; /&gt;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkwpincludesgeneraltemplatephp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/general-template.php (12586 => 12587)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/general-template.php        2009-12-30 16:54:28 UTC (rev 12586)
+++ trunk/wp-includes/general-template.php        2009-12-30 17:05:02 UTC (rev 12587)
</span><span class="lines">@@ -273,9 +273,8 @@
</span><span class="cx">  * Retrieve information about the blog.
</span><span class="cx">  *
</span><span class="cx">  * Some show parameter values are deprecated and will be removed in future
</span><del>- * versions. Care should be taken to check the function contents and know what
- * the deprecated blog info options are. Options without &quot;// DEPRECATED&quot; are
- * the preferred and recommended ways to get the information.
</del><ins>+ * versions. These options will trigger the _deprecated_argument() function.
+ * The deprecated blog info options are listed in the function contents.
</ins><span class="cx">  *
</span><span class="cx">  * The possible values for the 'show' parameter are listed below.
</span><span class="cx">  * &lt;ol&gt;
</span><span class="lines">@@ -289,21 +288,19 @@
</span><span class="cx">  * comment feeds can be retrieved from the 'comments_atom_url' (Atom comment
</span><span class="cx">  * feed) or 'comments_rss2_url' (RSS 2.0 comment feed).
</span><span class="cx">  *
</span><del>- * There are many other options and you should check the function contents:
- * {@source 32 37}
- *
</del><span class="cx">  * @since 0.71
</span><span class="cx">  *
</span><span class="cx">  * @param string $show Blog info to retrieve.
</span><span class="cx">  * @param string $filter How to filter what is retrieved.
</span><span class="cx">  * @return string Mostly string values, might be empty.
</span><span class="cx">  */
</span><del>-function get_bloginfo($show = '', $filter = 'raw') {
</del><ins>+function get_bloginfo( $show = '', $filter = 'raw' ) {
</ins><span class="cx"> 
</span><del>-        switch($show) {
-                case 'url' :
</del><ins>+        switch( $show ) {
</ins><span class="cx">                 case 'home' : // DEPRECATED
</span><span class="cx">                 case 'siteurl' : // DEPRECATED
</span><ins>+                        _deprecated_argument( __FUNCTION__, '2.2', sprintf( __('The \'%1$s\' option is deprecated for the family of bloginfo() functions. Use the \'%2$s\' option instead.'), $show, 'url' ) );
+                case 'url' :
</ins><span class="cx">                         $output = get_option('home');
</span><span class="cx">                         break;
</span><span class="cx">                 case 'wpurl' :
</span></span></pre></div>
<a id="trunkwpincludeslinktemplatephp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/link-template.php (12586 => 12587)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/link-template.php        2009-12-30 16:54:28 UTC (rev 12586)
+++ trunk/wp-includes/link-template.php        2009-12-30 17:05:02 UTC (rev 12587)
</span><span class="lines">@@ -1304,7 +1304,7 @@
</span><span class="cx">         $request = preg_replace('|^/+|', '', $request);
</span><span class="cx"> 
</span><span class="cx">         if ( !$wp_rewrite-&gt;using_permalinks() || is_admin() ) {
</span><del>-                $base = trailingslashit( get_bloginfo( 'home' ) );
</del><ins>+                $base = trailingslashit( get_bloginfo( 'url' ) );
</ins><span class="cx"> 
</span><span class="cx">                 if ( $pagenum &gt; 1 ) {
</span><span class="cx">                         $result = add_query_arg( 'paged', $pagenum, $base . $request );
</span></span></pre>
</div>
</div>

</body>
</html>