[wp-hackers] Wordpress plugin system

Denis de Bernardy denis at semiologic.com
Mon May 30 10:21:11 GMT 2005

I sometimes want to access other data from the post before applying a
filter, because the result would depend on the context. And with the current
system, well... You just can't.

Imho, a more correct approach would have been something like:

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

$comment = apply_filters('comment_main', $comment);
$comment = apply_filters('comment_meta', $comment);

Or even something along the lines of:


The '_main' filter would be used when a post or a comment is displayed as
data in its own right. The '_meta' filter would be used when the post is
displayed in a recent posts list, for instance. Likely, there is room for a
'_excerpt' filter that is in between. Nonetheless, I would expect there is
little or no need for formatting filters beyond this.

Was there any discussion in the past regarding a step in this direction? If
so, I'd be curious to know why it was rejected.

Denis de Bernardy

More information about the wp-hackers mailing list