[wp-hackers] Coding Standards

Ryan Boren ryan at boren.nu
Wed Sep 1 19:22:16 UTC 2004


On Wed, 2004-09-01 at 09:54 -0700, Toivo Lainevool wrote:
> Mike Little wrote:
> 
> >As Alex already pointed out, we already have guidelines here:
> >http://wordpress.org/docs/developer/coding-style/
> >
> >Perhaps they could be more explicit though: i.e. "Pear standards
> >except as noted here."
> >
> >Mike
> >  
> >
> The problem is the wp code *doesn't* follow the pear standards as far as 
> I can tell.
> 
> For example, the PEAR standard states:
> "Class names should always begin with an uppercase letter" 
> (http://pear.php.net/manual/en/standards.naming.php)
> 
> Examples of wp class names: xmlrpc_client,  wpdb
> 
> Right now it seems like wp coding standards are "self-documenting", that 
> is, you just look at the code and try to copy the style the best you can.

Some of these classes are third-party and follow different rules.  Also,
we have to maintain certain variable, class, and function names to
preserve backwards compatibility back to a time that preceded the coding
standard.  But, yes, we can be a bit sloppy with the coding rules at
times.  I'm certainly guilty of that.  Something to work on.

Ryan




More information about the hackers mailing list