Make WordPress Core

Opened 19 years ago

Closed 17 years ago

Last modified 14 years ago

#6847 closed defect (bug) (duplicate)

'the_content_rss' hook not working

Reported by: scribu Owned by:
Priority: normal Milestone:
Component: General Version: 2.5.1
Severity: normal Keywords:
Cc: Focuses:

Description

'the_content_rss' filter does not trigger the callback function. Here is an example:

<?php
/*
Plugin Name: TestRSS
Plugin URI:
Description: Test plugin
Version: 0.1
Date: Mar 31th, 2008
Author: Antonio Perez
Author URI:
*/

function test_rss($text)
{

$text = "Hello world";
return $text;

}

add_filter('the_content_rss', 'test_rss');
?>

This error has also been present in version 2.5

Attachments (1)

the_content_rss_filter_when_feed.patch​ (671 bytes ) - added by mystyman 19 years ago.

Download all attachments as: .zip

Change History (17)

#1 @scribu
19 years ago

  • Owner changed from anonymous to guillep2k, ionfish

#2 @scribu
19 years ago

  • Owner changed from guillep2k, ionfish to guillep2k

#3 follow-up: @mystyman
19 years ago

  • Keywords has_patch needs_testing added

It appears that rss2 and atom are run through the_content not the_content_rss. Here is a little patch that should run it through the correct filter hook anyway. needs testing though.

#4 in reply to: ↑ 3 @skarcha
19 years ago

Replying to mystyman:

It appears that rss2 and atom are run through the_content not the_content_rss. Here is a little patch that should run it through the correct filter hook anyway. needs testing though.

Tested and works for me now. Thanks.

#5 @fuggi
18 years ago

Related to this ticket called "the_content_rss() is used incorrectly in non RSS feed": ​http://trac.wordpress.org/ticket/3884

#6 @ryan
18 years ago

  • Milestone 2.5.2 → 2.9

Milestone 2.5.2 deleted

#7 @scribu
18 years ago

  • Milestone 2.9 → 2.6.1

#8 @scribu
18 years ago

  • Owner guillep2k removed

#9 @scribu
18 years ago

  • Owner set to anonymous

#10 @westi
18 years ago

  • Keywords has_patch needs_testing the_content_rss filter feed removed
  • Milestone 2.6.1 → 2.9

Moving back to 2.9

#11 @scribu
18 years ago

  • Milestone 2.9 → 2.6.2

#12 @westi
18 years ago

  • Milestone 2.6.2
  • Resolution → invalid
  • Status new → closed

Closing as invalid.

the_content_rss hook is called by the_content_rss function.

It sbhould not be called by the_content function that should as it does not call the_content hook.

#13 @tadhg
18 years ago

westi: You're right about how it should work, but the problem is that apparently the_content_rss hook doesn't always get called--i.e. with Atom or RSS2 feeds. It looks to me like mystyman's patch addresses the problem that's caused by
​http://core.trac.wordpress.org/ticket/8706

I think this bug should be a duplicate of 8706 at this point.

#14 @lloydbudd
17 years ago

  • Resolution invalid
  • Status closed → reopened

#15 @lloydbudd
17 years ago

  • Resolution → duplicate
  • Status reopened → closed

#16 @gaveideer
14 years ago

Nothing.

Last edited 14 years ago by SergeyBiryukov (previous) (diff)
Note: See TracTickets for help on using tickets.