[wp-hackers] Intervening in $posts and hidden categories
Matt Mullenweg
m at mullenweg.com
Thu Jun 17 05:36:19 UTC 2004
ayj & j wrote:
> So to return to the more general case - wp-blog-header deals very well with
> a multitude of possible page request types (eg author requests, date
> requests, category requests) which one does not want to modify / repeat for
> a special purpose plugins. So it might help to be able to have the ability
> to intervene in wp-blog-header by some system of hooks / filters / actions,
> particularly those that might influence the database query string.
I think Ryan's suggestion of the two additional filter hooks (on the query
and the resulting object array) are excellent. Just as a matter of
implementation, however, I think it makes sense for a sticky-post type
plugin to utilize the category infrastructure. Then in your plugin file
you could get the ID of the sticky category and add a simple $cat = -123;
to your plugin file to exclude that category from the main loop. With
regards to interface, I think checking and unchecking a category is much
easier than putting a specified value in a custom field and then deleting
it later.
This brings us to something that has been discussed before, hidden
categories. Someone had suggested that categories that begin with a
period, like .sticky, should be suppressed from view in the category
listing, like "hidden" dot files in linux. This seems like an excellent
idea to me. Any comments?
--
Matt Mullenweg
http://photomatt.net | http://wordpress.org
http://pingomatic.com | more soon...
More information about the hackers
mailing list