WordPress.org

Make WordPress Core

Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#10184 closed enhancement (wontfix)

feed_links() cannot be removed from wp_head

Reported by: peaceablewhale Owned by:
Milestone: Priority: normal
Severity: normal Version: 2.8
Component: Template Keywords: close
Focuses: Cc:

Description

Due to the way feed_links() is added to wp_head in automatic_feed_links(), it cannot be removed by a plugin.

Attachments (1)

10184.patch (916 bytes) - added by peaceablewhale 6 years ago.

Download all attachments as: .zip

Change History (9)

@peaceablewhale6 years ago

comment:1 @dd326 years ago

Is there any reason why a plugin cannot call automatic_feed_links(false) directly?

comment:2 @Denis-de-Bernardy6 years ago

  • Milestone changed from 2.8.1 to 2.9
  • Type changed from defect (bug) to enhancement

adding to this, the filter (assuming we add any) should be in the function directly imo

comment:3 @peaceablewhale6 years ago

First of all, I am surprised that there are comments in the report but Trac has not notified me by email. Is there a bug in Trac?

@dd32: I suspect that automatic_feed_links(false) is called by the plugin first, but then the templete calls automatic_feed_links(true).

comment:4 @peaceablewhale6 years ago

  • Milestone changed from 2.9 to 2.8.1

A patch, if any, should be checked in to 2.8 as automatic_feed_links was designed to be modified by plugins according to #8878.

comment:5 @Denis-de-Bernardy6 years ago

  • Keywords close added; has-patch removed

if you add this on the init hook, it should work:

automatic_feed_links(false);

comment:6 @Denis-de-Bernardy6 years ago

  • Milestone 2.8.1 deleted
  • Resolution set to wontfix
  • Status changed from new to closed

100% it will, in fact.

comment:7 @dd326 years ago

@dd32: I suspect that automatic_feed_links(false) is called by the plugin first, but then the templete calls automatic_feed_links(true).

That sounds plausable..

try hooking wp_head rather early and try it then:

add_action('wp_head', 'my_function', 5);

comment:8 @peaceablewhale6 years ago

Thanks dd32. Your suggestion worked.

Note: See TracTickets for help on using tickets.