[wp-hackers] Editing the Comment Reply Link
David Law
wp-hackers at google-adsense-templates.co.uk
Wed Dec 15 00:41:48 UTC 2010
Hi,
I know WordPress 3.1 has removed the nofollow attribute from the
comment Reply link (WordPress 3.1 beta looks good), but was working on
something theme wise that should also work with removing the nofollow
attribute from the link for WordPress 3.0.3 and below, but can't get
it working.
Basically adding this code to the comments loop as a test works:
$comment->comment_content = str_replace('nofollow', 'Test
One',$comment->comment_content);
This removes the text nofollow from a comments body. This works as
expected. Going to try to use the concept to replace fully formed HTML
links from the body of comments and leave something like
http://www.domain.com : Anchor Text
This will remove the final WordPress nofollow links from my setup
without allowing follow links from comments. I digress, next step, not
there yet.
I tried
$comment_reply_link->reply_text = str_replace('Reply', 'Test
Two',$comment_reply_link->reply_text );
As another test to replace the anchor text of the Reply link to
confirm I'm on the right track.
Didn't work.
and
$comment_reply_link->link = str_replace('nofollow',
'',$comment_reply_link->link );
to delete the nofollow part of the rel attribute.
Didn't work either
Tried a variety of permutations with no joy.
Any ideas?
David
--
Monetize your WordPress blog with Search Engine Optimized templates
including AdSense ads http://www.google-adsense-templates.co.uk/
More information about the wp-hackers
mailing list