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

Christoph Rummel bronski at bronski.net
Sun Jan 23 09:28:58 GMT 2005


On 22.01.2005, at 18:11, 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'.
>
> It's also not possible to explicitly disable nofollow on
> get_comment_author_link().  Instead, you must *add* a
> plugin to replace the rel="nofollow" parameter with emptystring.
>
> Even if the code stays as-is, you can still write a plugin to
> remove the attributes pretty trivially.  But the one remove_filter()
> line won't do everything.

That is exactly what I did in my nonofollow-plugin at
http://bronski.net/data/nonofollow/ .

Actually I just did a second version of that plugin that not only
removes the nofollows but first checks the date of every comment
and only removes the nofollow after a certain number of days -
which was proposed somewhere in one of the threads.

Chris



More information about the hackers mailing list