[wp-hackers] Re: 2.0.10 and 2.1.3 Release Candidates

Ryan Boren ryan at boren.nu
Sat Mar 17 19:00:10 GMT 2007


On 3/17/07, Timo Kissing <timo.kissing+wordpress at gmail.com> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Alex King schrieb:
> > I'd recommend an additional refactoring to introduce a single
> > 'wp_escape' function, or similar. The function would accept 2
> > parameters, the string and the type of usage (js, attribute, url, etc.).
> > Both params would be required with no default values to force people to
> > use/set the right one.
>
> Instead of one big function I would prefer one (static) class with
> several (again static) methods, so you would use wp_escape::js($string),
> wp_escape::url($string) etc. This way all the functions are kept in one
> place, but it's easy to change one without messing with code that
> effects the others - and you avoid large if...elseif...else blocks. WP
> in my opinion make much more use of OOP anyhow (and strictly confirming
> to a "one class/one function per file" rule would not hurt either, but
> instead make "messing" with the core and updating later much easier).

I'm not averse to any of these suggestions, but I'm worried that
another round of changes might be a bit much to get done for 2.0.10
and 2.1.3.  Release of these is already way overdue.  Shall we stick
with what we have and work on a new way for 2.2?  The new way can then
be backported to 2.1 and 2.0 under less time sensitive conditions.

Ryan


More information about the wp-hackers mailing list