[wp-hackers] CVS: wordpress/wp-includes comment-functions.php

Scott Merrill skippy at skippy.net
Sat Jan 22 18:38:43 GMT 2005


Owen Winkler wrote:
> make_clickable() is registered as a plugin on 'comment_text'.  So if a 
> comment is submitted with a URL (not a tag in this case, but just a URL 
> in text) it is converted to a working <a> link with rel="nofollow".  You 
> *can* disable the filter, but then you also disable the feature of 
> turning raw URLs into working links.
> 
> A better solution would be to write a single do_nofollow() function and 
> register that as a filter on 'comment_text' so that it executes after 
> all of the other registered filters.  Then if it's disabled, it doesn't 
> affect the existing features.  wp_rel_nofollow() does this, but it's not 
> registered for 'comment_text', only 'pre_comment_content'.

This approach gets my vote, especially if the do_nofollow() function can 
be bundled as a plugin for distribution _right now_.  The plugin system 
makes it easy for new features like this to be adopted by people 
unwilling or unable to upgrade to a newer version.  Since 1.5 isn't 
ready for prime time, and this is such a visible issue, a 
forward-looking but backward-compatible solution is the best option, 
methinks.

A nofollow plugin will benefit everyone using WordPress who wants to use 
it; and it need not burden anyone who doesn't want it.

I politely suggest that any current changes to the core WP code be 
removed and replaced with a bundled plugin, which is enabled by default. 
  That strikes the greatest balance for adoption while preserving 
individual choice.


More information about the hackers mailing list