mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-07-01 15:50:09 +00:00
Comments refactoring and cleanup
git-svn-id: https://develop.svn.wordpress.org/trunk@1964 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -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);
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user