[wp-hackers] Filter Hooks for Enclosures
Dave Grijalva
grijalva at gmail.com
Mon Feb 13 21:34:52 GMT 2006
I don't really know if all that is necessary. A lot could be done by just
tossing in some filter hooks here that are feed specific. Like being able
to modify the link string, or the enclosure url, etc. Being able to modify
a feed template would be nice, but there is a large potential there for
people to start breaking their feeds. A lot can be done with the plugin api
that will make it safer for users to modify things by allowing someone else
to do the heavy lifting.
-dave
On 2/13/06, Peter Westwood <peter.westwood at ftwr.co.uk> wrote:
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> 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
> >> array
> >> instead.
> >
> > That's really more what I was suggesting.
> >
> > There must be some class that would let us do something like this:
> >
> > ob_start();
> > // Existing feed stuff
> > $xml = ob_get_clean();
> > $feed = new WPXmlDoc($xml);
> > $feed = apply_filters('feed_xml', $feed);
> > $feed->output();
> >
> > ...
> >
> > add_filter('feed_xml', 'my_feed_xml');
> > function my_feed_xml($feed)
> > {
> > $feed->data['rss'][0]['customtag'][0] = '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.
>
> westi
> - --
> Peter Westwood
> http://blog.ftwr.co.uk
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.2 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iD8DBQFD8PkNVPRdzag0AcURAq/UAJ4xRqnBytO6z+YlnX9qzqdyygw3TQCgo8ZF
> VRoL1Z3ozz3u7U7ju7kbJuk=
> =C/Ve
> -----END PGP SIGNATURE-----
>
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>
More information about the wp-hackers
mailing list