Comments refactoring and cleanup

git-svn-id: https://develop.svn.wordpress.org/trunk@1964 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Matt Mullenweg
2004-12-16 02:57:05 +00:00
parent 459c45d572
commit b39c4f8273
15 changed files with 956 additions and 998 deletions

View File

@@ -94,7 +94,7 @@ $wp_gecko_correction['in'] = array(
'/\/', '/\/', '/\“/', '/\”/',
'/\•/', '/\/', '/\—/', '/\Ω/',
'/\β/', '/\γ/', '/\θ/', '/\λ/',
'/\Ï€/', '/\′/', '/\″/', '/\âˆ/',
'/\π/', '/\/', '/\/', '/\/',
'/\€/', '/\/'
);
$wp_gecko_correction['out'] = array(
@@ -193,4 +193,40 @@ add_filter('the_content', 'wptexturize');
add_filter('the_excerpt', 'wptexturize');
add_filter('bloginfo', 'wptexturize');
// Comments, trackbacks, pingbacks
add_filter('pre_comment_author_name', 'strip_tags');
add_filter('pre_comment_author_name', 'trim');
add_filter('pre_comment_author_name', 'wp_specialchars', 30);
add_filter('pre_comment_author_email', 'trim');
add_filter('pre_comment_author_email', 'sanitize_email');
add_filter('pre_comment_author_url', 'strip_tags');
add_filter('pre_comment_author_url', 'trim');
add_filter('pre_comment_author_url', 'clean_url');
add_filter('pre_comment_content', 'wp_filter_kses');
add_filter('pre_comment_content', 'format_to_post');
add_filter('pre_comment_content', 'balanceTags', 30);
// Default filters for these functions
add_filter('comment_author', 'wptexturize');
add_filter('comment_author', 'convert_chars');
add_filter('comment_email', 'antispambot');
add_filter('comment_url', 'clean_url');
add_filter('comment_text', 'convert_chars');
add_filter('comment_text', 'make_clickable');
add_filter('comment_text', 'wpautop', 30);
add_filter('comment_text', 'convert_smilies', 20);
add_filter('comment_excerpt', 'convert_chars');
// Places to balance tags on input
add_filter('content_save_pre', 'balanceTags', 50);
add_filter('excerpt_save_pre', 'balanceTags', 50);
add_filter('comment_save_pre', 'balanceTags', 50);
?>