<!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>[13398] trunk: Deprecate automatic_feed_links()
  in favor of add_theme_support('automatic-feed-links').</title>
</head>
<body>

<div id="msg">
<dl>
<dt>Revision</dt> <dd><a href="http://trac.wordpress.org/changeset/13398">13398</a></dd>
<dt>Author</dt> <dd>dd32</dd>
<dt>Date</dt> <dd>2010-02-25 08:56:19 +0000 (Thu, 25 Feb 2010)</dd>
</dl>

<h3>Log Message</h3>
<pre>Deprecate automatic_feed_links() in favor of add_theme_support('automatic-feed-links'). Props Viper007Bond. Fixes <a href="http://trac.wordpress.org/ticket/12364">#12364</a></pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkwpcontentthemesclassicfunctionsphp">trunk/wp-content/themes/classic/functions.php</a></li>
<li><a href="#trunkwpcontentthemesdefaultfunctionsphp">trunk/wp-content/themes/default/functions.php</a></li>
<li><a href="#trunkwpcontentthemestwentytenfunctionsphp">trunk/wp-content/themes/twentyten/functions.php</a></li>
<li><a href="#trunkwpincludesdefaultfiltersphp">trunk/wp-includes/default-filters.php</a></li>
<li><a href="#trunkwpincludesdeprecatedphp">trunk/wp-includes/deprecated.php</a></li>
<li><a href="#trunkwpincludesgeneraltemplatephp">trunk/wp-includes/general-template.php</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkwpcontentthemesclassicfunctionsphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-content/themes/classic/functions.php (13397 => 13398)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-content/themes/classic/functions.php        2010-02-25 08:48:17 UTC (rev 13397)
+++ trunk/wp-content/themes/classic/functions.php        2010-02-25 08:56:19 UTC (rev 13398)
</span><span class="lines">@@ -4,7 +4,7 @@
</span><span class="cx">  * @subpackage Classic_Theme
</span><span class="cx">  */
</span><span class="cx"> 
</span><del>-automatic_feed_links();
</del><ins>+add_theme_support( 'automatic-feed-links' );
</ins><span class="cx"> 
</span><span class="cx"> if ( function_exists('register_sidebar') )
</span><span class="cx">         register_sidebar(array(
</span></span></pre></div>
<a id="trunkwpcontentthemesdefaultfunctionsphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-content/themes/default/functions.php (13397 => 13398)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-content/themes/default/functions.php        2010-02-25 08:48:17 UTC (rev 13397)
+++ trunk/wp-content/themes/default/functions.php        2010-02-25 08:56:19 UTC (rev 13398)
</span><span class="lines">@@ -6,7 +6,7 @@
</span><span class="cx"> 
</span><span class="cx"> $content_width = 450;
</span><span class="cx"> 
</span><del>-automatic_feed_links();
</del><ins>+add_theme_support( 'automatic-feed-links' );
</ins><span class="cx"> 
</span><span class="cx"> if ( function_exists('register_sidebar') ) {
</span><span class="cx">         register_sidebar(array(
</span></span></pre></div>
<a id="trunkwpcontentthemestwentytenfunctionsphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-content/themes/twentyten/functions.php (13397 => 13398)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-content/themes/twentyten/functions.php        2010-02-25 08:48:17 UTC (rev 13397)
+++ trunk/wp-content/themes/twentyten/functions.php        2010-02-25 08:56:19 UTC (rev 13398)
</span><span class="lines">@@ -2,7 +2,7 @@
</span><span class="cx"> 
</span><span class="cx"> // Set the content width based on the Theme CSS
</span><span class="cx"> if ( ! isset( $content_width ) )
</span><del>-   $content_width = 640;
</del><ins>+        $content_width = 640;
</ins><span class="cx"> 
</span><span class="cx"> if ( ! function_exists( 'twentyten_init' ) ) :
</span><span class="cx"> function twentyten_init() {
</span><span class="lines">@@ -26,8 +26,8 @@
</span><span class="cx">         // so we want them to be 940 pixels wide by 198 pixels tall (larger images will be auto-cropped to fit)
</span><span class="cx">         set_post_thumbnail_size( HEADER_IMAGE_WIDTH, HEADER_IMAGE_HEIGHT, true );
</span><span class="cx"> 
</span><del>-        // Add default posts and comments RSS feed links to head.
-        automatic_feed_links();
</del><ins>+        // Add default posts and comments RSS feed links to head
+        add_theme_support( 'automatic-feed-links' );
</ins><span class="cx"> 
</span><span class="cx">         // Make theme available for translation
</span><span class="cx">         // Translations can be filed in the /languages/ directory
</span></span></pre></div>
<a id="trunkwpincludesdefaultfiltersphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/default-filters.php (13397 => 13398)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/default-filters.php        2010-02-25 08:48:17 UTC (rev 13397)
+++ trunk/wp-includes/default-filters.php        2010-02-25 08:56:19 UTC (rev 13398)
</span><span class="lines">@@ -168,8 +168,9 @@
</span><span class="cx"> add_filter( 'atom_service_url','atom_service_url_filter' );
</span><span class="cx"> 
</span><span class="cx"> // Actions
</span><del>-add_action( 'wp_head',             'wp_enqueue_scripts',             1    );
-add_action( 'wp_head',             'feed_links_extra',               3    );
</del><ins>+add_action( 'wp_head',             'wp_enqueue_scripts',            1     );
+add_action( 'wp_head',             'feed_links',                    3     );
+add_action( 'wp_head',             'feed_links_extra',              3     );
</ins><span class="cx"> add_action( 'wp_head',             'rsd_link'                             );
</span><span class="cx"> add_action( 'wp_head',             'wlwmanifest_link'                     );
</span><span class="cx"> add_action( 'wp_head',             'index_rel_link'                       );
</span><span class="lines">@@ -178,9 +179,9 @@
</span><span class="cx"> add_action( 'wp_head',             'adjacent_posts_rel_link',       10, 0 );
</span><span class="cx"> add_action( 'wp_head',             'locale_stylesheet'                    );
</span><span class="cx"> add_action( 'publish_future_post', 'check_and_publish_future_post', 10, 1 );
</span><del>-add_action( 'wp_head',             'noindex',                        1    );
-add_action( 'wp_head',             'wp_print_styles',                8    );
-add_action( 'wp_head',             'wp_print_head_scripts',          9    );
</del><ins>+add_action( 'wp_head',             'noindex',                       1     );
+add_action( 'wp_head',             'wp_print_styles',               8     );
+add_action( 'wp_head',             'wp_print_head_scripts',         9     );
</ins><span class="cx"> add_action( 'wp_head',             'wp_generator'                         );
</span><span class="cx"> add_action( 'wp_head',             'rel_canonical'                        );
</span><span class="cx"> add_action( 'wp_footer',           'wp_print_footer_scripts'              );
</span></span></pre></div>
<a id="trunkwpincludesdeprecatedphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/deprecated.php (13397 => 13398)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/deprecated.php        2010-02-25 08:48:17 UTC (rev 13397)
+++ trunk/wp-includes/deprecated.php        2010-02-25 08:56:19 UTC (rev 13398)
</span><span class="lines">@@ -2411,4 +2411,16 @@
</span><span class="cx">                 do_action( 'updated_usermeta', $cur-&gt;umeta_id, $user_id, $meta_key, $meta_value );
</span><span class="cx"> 
</span><span class="cx">         return true;
</span><ins>+}
+
+/**
+ * Enable automatic general feed link outputting.
+ *
+ * @since 2.8.0
+ * @deprecated 3.0.0
+ * @deprecated Use add_theme_support( 'automatic-feed-links' )
+ */
+function automatic_feed_links() {
+        _deprecated_function( __FUNCTION__, '3.0', &quot;add_theme_support( 'automatic-feed-links' )&quot; );
+        add_theme_support( 'automatic-feed-links' );
</ins><span class="cx"> }
</span><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkwpincludesgeneraltemplatephp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/general-template.php (13397 => 13398)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/general-template.php        2010-02-25 08:48:17 UTC (rev 13397)
+++ trunk/wp-includes/general-template.php        2010-02-25 08:56:19 UTC (rev 13398)
</span><span class="lines">@@ -1562,22 +1562,6 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> /**
</span><del>- * Enable/disable automatic general feed link outputting.
- *
- * @since 2.8.0
- *
- * @param boolean $add Optional, default is true. Add or remove links. Defaults to true.
- */
-function automatic_feed_links( $add = true ) {
-        if ( $add )
-                add_action( 'wp_head', 'feed_links', 2 );
-        else {
-                remove_action( 'wp_head', 'feed_links', 2 );
-                remove_action( 'wp_head', 'feed_links_extra', 3 );
-        }
-}
-
-/**
</del><span class="cx">  * Display the links to the general feeds.
</span><span class="cx">  *
</span><span class="cx">  * @since 2.8.0
</span><span class="lines">@@ -1585,6 +1569,9 @@
</span><span class="cx">  * @param array $args Optional arguments.
</span><span class="cx">  */
</span><span class="cx"> function feed_links( $args = array() ) {
</span><ins>+        if ( !current_theme_supports('automatic-feed-links') )
+                return;
+
</ins><span class="cx">         $defaults = array(
</span><span class="cx">                 /* translators: Separator between blog name and feed type in feed links */
</span><span class="cx">                 'separator'        =&gt; _x('&amp;raquo;', 'feed link'),
</span></span></pre>
</div>
</div>

</body>
</html>