Opened 15 years ago
Closed 15 years ago
#12364 closed enhancement (fixed)
Deprecate automatic_feed_links() in favor of add_theme_support()
Reported by: | Viper007Bond | Owned by: | Viper007Bond |
---|---|---|---|
Milestone: | 3.0 | Priority: | normal |
Severity: | normal | Version: | 3.0 |
Component: | Themes | Keywords: | has-patch |
Focuses: | Cc: |
Description
add_theme_support()
didn't exist when I wrote automatic_feed_links()
. It'd be much more appropriate to use it now. Something like add_theme_support( 'automatic-feed-links' )
or something.
As a reminder: automatic_feed_links()
tells WordPress that your theme doesn't contain any feed links in it's <head>
and that WordPress should dynamically add them itself based on what page the user is viewing. This isn't done by default to avoid duplicate feed link output in older themes.
Fairly simple change, can be slipped into 3.0 I think. I'll have a patch ASAP.
Attachments (2)
Change History (9)
#4
follow-up:
↓ 5
@
15 years ago
- Resolution fixed deleted
- Status changed from closed to reopened
From what I can see, there's now no longer a possibility to automatically have the call to feed_links_extra() removed.
While before the commit, this could be achieved by automatic_feed_links( false );, one would now have to manually add the remove_action(...) call.
This breaks backward compatibility.
I suggest to also add
if ( !current_theme_supports('automatic-feed-links') ) return;
to feed_links_extra().
#5
in reply to:
↑ 4
@
15 years ago
Replying to TobiasBg:
I suggest to also add
if ( !current_theme_supports('automatic-feed-links') ) return;to feed_links_extra().
No because feed_links_extra()
ran by default (without the function call).
You're right though that I shouldn't break backwards compatibility, especially when it's easy not to.
Incoming patch.
Big +1, nice idea. Putting it alongside other things that themes should support should raise its profile a bit as well. We should probably put this into Kubrick also.