Issue
I am using this code but I am not getting results, the nofollow is still there.
function remove_nofollowcancel($formatted_link, $link, $text){
return str_replace("rel='nofollow'", "", $formatted_link );
}
add_filter('cancel_comment_reply_link', 'remove_nofollowcancel', 10, 3);
Solution
have you tried reversing the quotes?
return str_replace('rel="nofollow"', "", $formatted_link );
When looking at the internals of get_cancel_comment_reply_link
the rel
attribute is using double quotes.
Docs: https://developer.wordpress.org/reference/functions/get_cancel_comment_reply_link/
Answered By - mikerojas Answer Checked By - Terry (PHPFixing Volunteer)
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.