http:\/\/www.theblog.ca\/literal-comments<\/a><\/p>\n <\/p>\n
\/\/ This will occur when the comment is posted\nfunction plc_comment_post( $incoming_comment ) {\n\n\t\/\/ convert everything in a comment to display literally\n\t$incoming_comment['comment_content'] = htmlspecialchars($incoming_comment['comment_content']);\n\n\t\/\/ the one exception is single quotes, which cannot be #039; because WordPress marks it as spam\n\t$incoming_comment['comment_content'] = str_replace( \"'\", ''', $incoming_comment['comment_content'] );\n\n\treturn( $incoming_comment );\n}\n\n\/\/ This will occur before a comment is displayed\nfunction plc_comment_display( $comment_to_display ) {\n\n\t\/\/ Put the single quotes back in\n\t$comment_to_display = str_replace( ''', \"'\", $comment_to_display );\n\n\treturn $comment_to_display;\n}\n\nadd_filter( 'preprocess_comment', 'plc_comment_post', '', 1);\nadd_filter( 'comment_text', 'plc_comment_display', '', 1);\nadd_filter( 'comment_text_rss', 'plc_comment_display', '', 1);\nadd_filter( 'comment_excerpt', 'plc_comment_display', '', 1);<\/pre>\n <\/p>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_genesis_hide_title":false,"_genesis_hide_breadcrumbs":false,"_genesis_hide_singular_image":false,"_genesis_hide_footer_widgets":false,"_genesis_custom_body_class":"","_genesis_custom_post_class":"","_genesis_layout":"","footnotes":""},"categories":[2],"tags":[64],"yoast_head":"\n
Custom Wordpress Comments - My Monkey Do<\/title>\n\n\n\n\n\n\n\n\n\n\n\n\n\t\n\t\n\t\n