[wp-hackers] New in CVS

Ryan Boren ryan at boren.nu
Thu Jul 29 19:44:24 UTC 2004


On Thu, 2004-07-29 at 12:09 -0700, Steve Ivy wrote:
> I'm curious as to the direction of the API in 1.3. Are we moving in a 
> more OO/encapsulated direction? I've got a buddy who is working on 
> setting up a WP site, and he was commenting on the prodigious use of 
> GLOBALS and echo statements in 1.2, which can make hacking much more of 
>   a mess...

Better encapsulation is something we're aiming for.  You'll notice that
in things like the introduction of the WP_Query_State class, the
placement of the database vars in $wpdb, and the move of the blog header
code into query_posts().

We don't expose OO to the users, however.  They shouldn't have to
instantiate a class to work on their templates.  The templates are
complicated enough as it is.

Anyway, paring down the usage of globals is something we're working on.
Things like is_single() and is_category() alone allow us to eliminate
lots of global usage.  Instead of having to peek at $p, $name, $cat,
$category_name, etc., you just call is_single() or is_category().

Ryan


> On Jul 29, 2004, at 11:53 AM, Ryan Boren wrote:
> 
> > * Full support for timestamp post permalinks.
> >
> > * Post paging cleanup.  Paging is now done by default.
> >
> > * mod_rewrite rules can be automatically written to .htaccess if that
> > file is writable.  (Props to Owen Winkler)
> >
> > * Admin UI tweaks.
> >
> > * wp-mail improvements from Kitten.
> >
> > * Numerous bug fixes.
> >
> >
> > Give it a twirl.  Remember to run upgrade.php.
> >
> > Ryan





More information about the hackers mailing list