Make WordPress Core


Ignore:
Timestamp:
12/16/2004 02:57:05 AM (20 years ago)
Author:
saxmatt
Message:

Comments refactoring and cleanup

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/vars.php

    r1952 r1964  
    9292);
    9393$wp_gecko_correction['in'] = array(
    94     '/\‘/', '/\’/', '/\“/', '/\”/',
    95     '/\•/', '/\–/', '/\—/', '/\Ω/',
    96     '/\β/', '/\γ/', '/\θ/', '/\λ/',
    97     '/\π/', '/\′/', '/\″/', '/\âˆ/',
    98     '/\€/', '/\ /'
     94    '/\‘/', '/\’/', '/\“/', '/\”/',
     95    '/\•/', '/\–/', '/\—/', '/\Ω/',
     96    '/\β/', '/\γ/', '/\θ/', '/\λ/',
     97    '/\π/', '/\′/', '/\″/', '/\/',
     98    '/\€/', '/\ /'
    9999);
    100100$wp_gecko_correction['out'] = array(
     
    194194add_filter('bloginfo', 'wptexturize');
    195195
     196// Comments, trackbacks, pingbacks
     197add_filter('pre_comment_author_name', 'strip_tags');
     198add_filter('pre_comment_author_name', 'trim');
     199add_filter('pre_comment_author_name', 'wp_specialchars', 30);
     200
     201add_filter('pre_comment_author_email', 'trim');
     202add_filter('pre_comment_author_email', 'sanitize_email');
     203
     204add_filter('pre_comment_author_url', 'strip_tags');
     205add_filter('pre_comment_author_url', 'trim');
     206add_filter('pre_comment_author_url', 'clean_url');
     207
     208add_filter('pre_comment_content', 'wp_filter_kses');
     209add_filter('pre_comment_content', 'format_to_post');
     210add_filter('pre_comment_content', 'balanceTags', 30);
     211
     212// Default filters for these functions
     213add_filter('comment_author', 'wptexturize');
     214add_filter('comment_author', 'convert_chars');
     215
     216add_filter('comment_email', 'antispambot');
     217
     218add_filter('comment_url', 'clean_url');
     219
     220add_filter('comment_text', 'convert_chars');
     221add_filter('comment_text', 'make_clickable');
     222add_filter('comment_text', 'wpautop', 30);
     223add_filter('comment_text', 'convert_smilies', 20);
     224
     225add_filter('comment_excerpt', 'convert_chars');
     226
     227// Places to balance tags on input
     228add_filter('content_save_pre', 'balanceTags', 50);
     229add_filter('excerpt_save_pre', 'balanceTags', 50);
     230add_filter('comment_save_pre', 'balanceTags', 50);
     231
    196232?>
Note: See TracChangeset for help on using the changeset viewer.