<!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->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 = "";
</span><span class="cx">                 $cats = get_categories(array('hierarchical' => 0, 'hide_empty' => 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">         <link rel="self" type="application/atom+xml" href="<?php echo get_search_comments_feed_link('', 'atom'); ?>" />
</span><span class="cx">         <id><?php echo get_search_comments_feed_link('', 'atom'); ?></id>
</span><span class="cx"> <?php } else { ?>
</span><del>-        <link rel="alternate" type="<?php bloginfo_rss('html_type'); ?>" href="<?php bloginfo_rss('home'); ?>" />
</del><ins>+        <link rel="alternate" type="<?php bloginfo_rss('html_type'); ?>" href="<?php bloginfo_rss('url'); ?>" />
</ins><span class="cx">         <link rel="self" type="application/atom+xml" href="<?php bloginfo_rss('comments_atom_url'); ?>" />
</span><span class="cx">         <id><?php bloginfo_rss('comments_atom_url'); ?></id>
</span><span class="cx"> <?php } ?>
</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="http://www.w3.org/2005/Atom"
</span><span class="cx"> xmlns:thr="http://purl.org/syndication/thread/1.0"
</span><span class="cx"> xml:lang="<?php echo get_option('rss_language'); ?>"
</span><del>- xml:base="<?php bloginfo_rss('home') ?>/wp-atom.php"
</del><ins>+ xml:base="<?php bloginfo_rss('url') ?>/wp-atom.php"
</ins><span class="cx"> <?php do_action('atom_ns'); ?>
</span><span class="cx"> >
</span><span class="cx">         <title type="text"><?php bloginfo_rss('name'); wp_title_rss(); ?></title>
</span><span class="lines">@@ -22,7 +22,7 @@
</span><span class="cx">         <updated><?php echo mysql2date('Y-m-d\TH:i:s\Z', get_lastpostmodified('GMT'), false); ?></updated>
</span><span class="cx">         <?php the_generator( 'atom' ); ?>
</span><span class="cx">
</span><del>-        <link rel="alternate" type="text/html" href="<?php bloginfo_rss('home') ?>" />
</del><ins>+        <link rel="alternate" type="text/html" href="<?php bloginfo_rss('url') ?>" />
</ins><span class="cx">         <id><?php bloginfo('atom_url'); ?></id>
</span><span class="cx">         <link rel="self" type="application/atom+xml" href="<?php self_link(); ?>" />
</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 "// DEPRECATED" 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"> * <ol>
</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->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 > 1 ) {
</span><span class="cx">                         $result = add_query_arg( 'paged', $pagenum, $base . $request );
</span></span></pre>
</div>
</div>
</body>
</html>