[wp-hackers] Filter Hooks for Enclosures
peter.westwood at ftwr.co.uk
Mon Feb 13 21:24:29 GMT 2006
-----BEGIN PGP SIGNED MESSAGE-----
Owen Winkler wrote:
> Denis de Bernardy wrote:
>>> There are some extant implementations of Object<->XML in PHP, so it
>>> might not be too difficult a conversion. Manipulating the feed XML
>>> via DOM in a plugin would be swell.
>>> Before I continue blathering about this, how much does this idea suck?
>> DOM/XML related stuff is far from being installed properly on most hosts,
>> and does not work the same in php4 and php5. I'd use a straightforward
> That's really more what I was suggesting.
> There must be some class that would let us do something like this:
> // Existing feed stuff
> $xml = ob_get_clean();
> $feed = new WPXmlDoc($xml);
> $feed = apply_filters('feed_xml', $feed);
> add_filter('feed_xml', 'my_feed_xml');
> function my_feed_xml($feed)
> $feed->data['rss']['customtag'] = 'test';
> return $feed;
> Or something.
Why not just makes feeds template items so that a user theme can have an
rss template for example rss.php, atom.php etc. and this is used
instead of the builtin feed handler.
If we standardise on hooks for the main places a plugin would want to
add and let the enduser extend some more if necessary.
This allows people to customise feeds to any degree without having to
muck around with object buffers and building/throwing away huge object
structures for every feed request.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
-----END PGP SIGNATURE-----
More information about the wp-hackers