<!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>[12537] trunk/wp-includes: Fix typo in _deprecated_argument()
  and start using _deprecated_argument() in wp-includes files.</title>
</head>
<body>

<div id="msg">
<dl>
<dt>Revision</dt> <dd><a href="http://trac.wordpress.org/changeset/12537">12537</a></dd>
<dt>Author</dt> <dd>westi</dd>
<dt>Date</dt> <dd>2009-12-24 11:12:04 +0000 (Thu, 24 Dec 2009)</dd>
</dl>

<h3>Log Message</h3>
<pre>Fix typo in _deprecated_argument() and start using _deprecated_argument() in wp-includes files. See <a href="http://trac.wordpress.org/ticket/11386">#11386</a> props nacin.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkwpincludesauthortemplatephp">trunk/wp-includes/author-template.php</a></li>
<li><a href="#trunkwpincludescommenttemplatephp">trunk/wp-includes/comment-template.php</a></li>
<li><a href="#trunkwpincludescommentphp">trunk/wp-includes/comment.php</a></li>
<li><a href="#trunkwpincludescronphp">trunk/wp-includes/cron.php</a></li>
<li><a href="#trunkwpincludesfunctionsphp">trunk/wp-includes/functions.php</a></li>
<li><a href="#trunkwpincludesposttemplatephp">trunk/wp-includes/post-template.php</a></li>
<li><a href="#trunkwpincludeswidgetsphp">trunk/wp-includes/widgets.php</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkwpincludesauthortemplatephp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/author-template.php (12536 => 12537)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/author-template.php        2009-12-24 11:06:00 UTC (rev 12536)
+++ trunk/wp-includes/author-template.php        2009-12-24 11:12:04 UTC (rev 12537)
</span><span class="lines">@@ -41,10 +41,14 @@
</span><span class="cx">  * @link http://codex.wordpress.org/Template_Tags/the_author
</span><span class="cx">  *
</span><span class="cx">  * @param string $deprecated Deprecated.
</span><del>- * @param string $deprecated_echo Echo the string or return it.
</del><ins>+ * @param string $deprecated_echo Deprecated. Use get_the_author(). Echo the string or return it.
</ins><span class="cx">  * @return string The author's display name, from get_the_author().
</span><span class="cx">  */
</span><span class="cx"> function the_author($deprecated = '', $deprecated_echo = true) {
</span><ins>+        if ( !empty($deprecated) )
+                _deprecated_argument(__FUNCTION__, 'deprecated', '1.5');
+        if ( $deprecated_echo !== true )
+                _deprecated_argument(__FUNCTION__, 'deprecated_echo', '1.5', __('Use get_the_author() instead if you do not want the value echoed.'));
</ins><span class="cx">         if ( $deprecated_echo )
</span><span class="cx">                 echo get_the_author();
</span><span class="cx">         return get_the_author();
</span><span class="lines">@@ -177,6 +181,9 @@
</span><span class="cx">  * @param string $deprecated Deprecated.
</span><span class="cx">  */
</span><span class="cx"> function the_author_posts_link($deprecated = '') {
</span><ins>+        if ( !empty( $deprecated ) )
+                _deprecated_argument(__FUNCTION__, 'deprecated', '0.0');
+
</ins><span class="cx">         global $authordata;
</span><span class="cx">         $link = sprintf(
</span><span class="cx">                 '&lt;a href=&quot;%1$s&quot; title=&quot;%2$s&quot;&gt;%3$s&lt;/a&gt;',
</span></span></pre></div>
<a id="trunkwpincludescommenttemplatephp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/comment-template.php (12536 => 12537)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/comment-template.php        2009-12-24 11:06:00 UTC (rev 12536)
+++ trunk/wp-includes/comment-template.php        2009-12-24 11:12:04 UTC (rev 12537)
</span><span class="lines">@@ -503,10 +503,15 @@
</span><span class="cx">  *
</span><span class="cx">  * @since 0.71
</span><span class="cx">  *
</span><del>- * @param string $deprecated Not Used
- * @param bool $deprecated Not Used
</del><ins>+ * @param string $deprecated_1 Not Used
+ * @param bool $deprecated_2 Not Used
</ins><span class="cx">  */
</span><del>-function comments_link( $deprecated = '', $deprecated = '' ) {
</del><ins>+function comments_link( $deprecated_1 = '', $deprecated_2 = '' ) {
+        if ( !empty( $deprecated_1 ) )
+                _deprecated_argument(__FUNCTION__, 'deprecated_1', '0.0');
+        if ( !empty( $deprecated_2 ) )
+                _deprecated_argument(__FUNCTION__, 'deprecated_2', '0.0');
+
</ins><span class="cx">         echo get_comments_link();
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkwpincludescommentphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/comment.php (12536 => 12537)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/comment.php        2009-12-24 11:06:00 UTC (rev 12536)
+++ trunk/wp-includes/comment.php        2009-12-24 11:12:04 UTC (rev 12537)
</span><span class="lines">@@ -1511,7 +1511,9 @@
</span><span class="cx">  * @param int $deprecated Not Used.
</span><span class="cx">  * @return bool|string False on failure, string containing URI on success.
</span><span class="cx">  */
</span><del>-function discover_pingback_server_uri($url, $deprecated = 2048) {
</del><ins>+function discover_pingback_server_uri($url, $deprecated = '') {
+        if ( !empty($deprecated) )
+                _deprecated_argument(__FUNCTION__, 'deprecated', '0.0');
</ins><span class="cx"> 
</span><span class="cx">         $pingback_str_dquote = 'rel=&quot;pingback&quot;';
</span><span class="cx">         $pingback_str_squote = 'rel=\'pingback\'';
</span></span></pre></div>
<a id="trunkwpincludescronphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/cron.php (12536 => 12537)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/cron.php        2009-12-24 11:06:00 UTC (rev 12536)
+++ trunk/wp-includes/cron.php        2009-12-24 11:12:04 UTC (rev 12537)
</span><span class="lines">@@ -135,8 +135,10 @@
</span><span class="cx"> function wp_clear_scheduled_hook( $hook, $args = array() ) {
</span><span class="cx">         // Backward compatibility
</span><span class="cx">         // Previously this function took the arguments as discrete vars rather than an array like the rest of the API
</span><del>-        if ( !is_array($args) )
</del><ins>+        if ( !is_array($args) ) {
+                _deprecated_argument(__FUNCTION__, 'args', '3.0.0', __('This argument has changed to an array so as to match with the behaviour of all the other cron functions.') );
</ins><span class="cx">                 $args = array_slice( func_get_args(), 1 );
</span><ins>+        }
</ins><span class="cx"> 
</span><span class="cx">         while ( $timestamp = wp_next_scheduled( $hook, $args ) )
</span><span class="cx">                 wp_unschedule_event( $timestamp, $hook, $args );
</span></span></pre></div>
<a id="trunkwpincludesfunctionsphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/functions.php (12536 => 12537)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/functions.php        2009-12-24 11:06:00 UTC (rev 12536)
+++ trunk/wp-includes/functions.php        2009-12-24 11:12:04 UTC (rev 12537)
</span><span class="lines">@@ -3045,7 +3045,7 @@
</span><span class="cx"> 
</span><span class="cx">         // Allow plugin to filter the output error trigger
</span><span class="cx">         if( WP_DEBUG &amp;&amp; apply_filters( 'deprecated_argument_trigger_error', true ) ) {
</span><del>-                if( !is_null($replacement) )
</del><ins>+                if( !is_null($message) )
</ins><span class="cx">                         trigger_error( sprintf( __('The %1$s argument of %2$s is &lt;strong&gt;deprecated&lt;/strong&gt; since version %3$s! %4$s'), $function, $argument, $version, $message ) );
</span><span class="cx">                 else
</span><span class="cx">                         trigger_error( sprintf( __('The %1$s argument of %2$s is &lt;strong&gt;deprecated&lt;/strong&gt; since version %3$s with no alternative available.'), $function, $argument, $version ) );
</span></span></pre></div>
<a id="trunkwpincludesposttemplatephp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/post-template.php (12536 => 12537)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/post-template.php        2009-12-24 11:06:00 UTC (rev 12536)
+++ trunk/wp-includes/post-template.php        2009-12-24 11:12:04 UTC (rev 12537)
</span><span class="lines">@@ -246,6 +246,9 @@
</span><span class="cx">  * @return string
</span><span class="cx">  */
</span><span class="cx"> function get_the_excerpt($deprecated = '') {
</span><ins>+        if ( !empty( $deprecated ) )
+                _deprecated_argument(__FUNCTION__, 'deprecated', '2.3');
+
</ins><span class="cx">         global $post;
</span><span class="cx">         $output = $post-&gt;post_excerpt;
</span><span class="cx">         if ( post_password_required($post) ) {
</span></span></pre></div>
<a id="trunkwpincludeswidgetsphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/widgets.php (12536 => 12537)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/widgets.php        2009-12-24 11:06:00 UTC (rev 12536)
+++ trunk/wp-includes/widgets.php        2009-12-24 11:12:04 UTC (rev 12537)
</span><span class="lines">@@ -980,10 +980,13 @@
</span><span class="cx">  * @since 2.2.0
</span><span class="cx">  * @access private
</span><span class="cx">  *
</span><del>- * @param bool $update Optional, deprecated.
</del><ins>+ * @param bool $deprecated. Not used.
</ins><span class="cx">  * @return array Upgraded list of widgets to version 3 array format when called from the admin.
</span><span class="cx">  */
</span><span class="cx"> function wp_get_sidebars_widgets($deprecated = true) {
</span><ins>+        if ( $deprecated !== true )
+                _deprecated_argument(__FUNCTION__, 'deprecated', '0.0');
+
</ins><span class="cx">         global $wp_registered_widgets, $wp_registered_sidebars, $_wp_sidebars_widgets;
</span><span class="cx"> 
</span><span class="cx">         // If loading from front page, consult $_wp_sidebars_widgets rather than options
</span></span></pre>
</div>
</div>

</body>
</html>