[wp-trac] [WordPress Trac] #21017: Using force_feed() for simplepie in core

WordPress Trac wp-trac at lists.automattic.com
Tue Jun 19 09:43:56 UTC 2012


#21017: Using force_feed() for simplepie in core
--------------------------+------------------------------
 Reporter:  josh401       |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Feeds         |     Version:  3.4
 Severity:  normal        |  Resolution:
 Keywords:                |
--------------------------+------------------------------
Changes (by devgav):

 * cc: devgav (added)


Comment:

 From WP-Forums mailing list:

 Try to avoid force_feed, as SimplePie is good at detecting valid feeds -
 if it's invalid, it's normally invalid for a reason.

 Force feed action hook sample for further testing / reference:


 {{{
 add_action('wp_feed_options', 'force_feed', 10, 1);
 function force_feed($feed) {
         $feed->force_feed(true);
 }
 }}}


 You can also get the URL at this point if you want to do some checking:


 {{{
 add_action('wp_feed_options', 'force_feed', 10, 2);
 function force_feed($feed, $url) {
         if ($url == 'something') {
                 $feed->force_feed(true);
         }
 }
 }}}

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/21017#comment:4>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list