[wp-docs] Template Tags without pages

Ryan Boren ryan at boren.nu
Thu Mar 10 02:13:47 GMT 2005

On Wed, 2005-03-09 at 18:32 -0500, Kaf Oseo wrote:
> Craig Hartel wrote:
> >  > Given the number of query vars it has, it could be a complicated page
> > 
> >> - so how best do we tackle this?
> >>
> >> Carthik.
> >>
> > 
> > Get Ryan to write it?
> Heh.
> Can't deny that's a good idea, but if there was at least a modicum of 
> pre-existing stuff on it (even raw), I don't think I'd have a problem 
> working out how to document it.

Look through WP_Query::get_posts() in classes.php and make a list of
everything in $q[].  Those are the query vars.  Then we need to note the
type, allowed values, and default value for each query var.  Here's a
quick start.

Name: posts_per_page
Description: The number of posts to display per page.
Type: integer
Allowed values:  -1 and greater (-1 turns off paging, displaying all
Default: posts_per_page db option

Name: name
Description:  A sanitized post title
Type: string
Allowed values: Any post name in the db
Default: none

Name: p
Description: A post ID
Type: integer
Allowed values: Any post ID in the DB
Default: none

How about we get a list of all the query vars started in Codex and then
begin filling in the details for each.  The collected data can then be
used to generate something more readable.


More information about the wp-docs mailing list