1

Don't know how to change '@' and 'HTTP/S' in ALL comment-stuff, so those will be displayed in WP as unclickable contents.

Do you have the knowledge and patience to straighten the following lines?

comment-template.php or comment.php ??

function  clean_url_and_email( $comment_ID, $comment_approved ) {
    if( 1 === $comment_approved ){
        $email = preg_replace("/@/", '_ed_',  $email);   // Replace all '@' with 'ed'.
        $comment =  preg_replace( '/^https?:\/\//', ' at ', $comment );  // Replace http/s with "at". 
        $url =  preg_replace( '/^https?:\/\//', ' at ', $url );  // Replace http/s with "at". 
    }
} // add _ action :
add_filter( 'comment_post', ' clean_url_and_email', 10, 2 );

Thanks here, Frank

  • linebreaks didnt work as intended, sorry bout that – tellfranky Jul 19 '18 at 15:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.