[wp-hackers] Wordpress plugin system

Denis de Bernardy denis at semiologic.com
Tue May 31 01:13:45 GMT 2005

> be engineered a bit, well, 'smarter'.  For instance, 
> FeedWordPress could 
> have (should have!) embedded something into a meta field of (...)

Mm, actually, it does something along the lines of what you say already:

A) global $post;
B) Check for appropriate meta
C) Change permalink

So that when my recent comment plugin comes by, the same filter goes:

A) global $post; (still set to last in loop)
B) Check for appropriate meta (false positive)
C) Fuck things up

The real issue imho is to reduce the number of plugin hooks rather than
expand them, to make them more rigorous (more consistency in naming), and to
give developpers more control on the way they are applied. Hence my
suggestion to use something along the lines of:

$post = apply_filters( 'post_meta', $post );

With a couple of hooks that define the main contexts of use. To the plugin
developper, it makes two difference:

- There are few hooks to know, as opposed to many
- You change $post->post_title rather than $title, and return $post
- You can filter things based on the context


More information about the wp-hackers mailing list