[wp-hackers] Looking for input
Dave Grijalva
grijalva at gmail.com
Thu Feb 16 08:48:41 GMT 2006
Hey, thanks for the feedback. This is my first wp plugin so I'm still
learning all the hooks and whatnot. I'll definitely incorporate these
suggestions in the next rev.
-dave
On 2/15/06, Sam Angove <sam at rephrase.net> wrote:
>
> On 2/16/06, Dave Grijalva <grijalva at gmail.com> wrote:
> > I don't know if this is the right place to ask this, but I've been
> working
> > on a wordpress plugin and I'm looking for some testers/feedback from
> other
> > wp hackers. Anyway, the url is
> > http://theblogthatnoonereads.tunasoft.com/coralize/
>
> That looks like a great plugin. A few things from browsing the source:
>
> * `wp_head` is a really bad hook to put `coralize_site()` on, since
> it's theme-dependent and called very late. Maybe `plugins_loaded` or
> `init`.
>
> * For the blacklist regex, you can use negative lookahead. Something like:
>
> (<img\s+.*?src="http://(?!(example.com|example.net)).*?)(/.*?".*?>)
>
> * Single quotes are also valid for HTML attributes, but the plugin
> only matches double quotes.
>
> * Is there some reason I don't see to use `coralize_preg_domain()`
> instead of PHP's `preg_quote()`?
>
> * Just for general readability, you don't need to backslash-escape
> nearly so much in the regular expressions, especially if you use
> something other than forward-slash as the delimiter.
>
> :)
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>
More information about the wp-hackers
mailing list