New answers tagged

2

Don't think so after skimming through the wptexturize() code, but what about using the run_wptexturize filter (untested): // Turn off wptexturize add_filter( 'run_wptexturize', '__return_false' ); // Your text handling here ... $text = apply_filters( 'the_content', $text ); // Remove filter remove_filter( 'run_wptexturize', '__return_false' ); i.e. ...


1

Never edit the WordPress core files. Instead you should hook into the pre_comment_content, which is where the comment text from the textarea is being sanitized, before it's inserted into the database. In the example below preg_replace is used to sanitize the comment text submitted. You should modify the function to fit your needs. function ...



Top 50 recent answers are included