[ Index ]

WordPress Source Cross Reference

title

Body

[close]

/wp-includes/ -> default-filters.php (source)

   1  <?php
   2  
   3  // Some default filters
   4  add_filter('bloginfo','wp_specialchars');
   5  add_filter('category_description', 'wptexturize');
   6  add_filter('list_cats', 'wptexturize');
   7  add_filter('comment_author', 'wptexturize');
   8  add_filter('comment_text', 'wptexturize');
   9  add_filter('single_post_title', 'wptexturize');
  10  add_filter('the_title', 'wptexturize');
  11  add_filter('the_content', 'wptexturize');
  12  add_filter('the_excerpt', 'wptexturize');
  13  add_filter('bloginfo', 'wptexturize');
  14  
  15  // Comments, trackbacks, pingbacks
  16  add_filter('pre_comment_author_name', 'strip_tags');
  17  add_filter('pre_comment_author_name', 'trim');
  18  add_filter('pre_comment_author_name', 'wp_specialchars', 30);
  19  
  20  add_filter('pre_comment_author_email', 'trim');
  21  add_filter('pre_comment_author_email', 'sanitize_email');
  22  
  23  add_filter('pre_comment_author_url', 'strip_tags');
  24  add_filter('pre_comment_author_url', 'trim');
  25  add_filter('pre_comment_author_url', 'clean_url');
  26  
  27  add_filter('pre_comment_content', 'wp_rel_nofollow', 15);
  28  add_filter('pre_comment_content', 'balanceTags', 30);
  29  
  30  add_filter('pre_comment_author_name', 'wp_filter_kses');
  31  add_filter('pre_comment_author_email', 'wp_filter_kses');
  32  add_filter('pre_comment_author_url', 'wp_filter_kses');
  33  
  34  // Default filters for these functions
  35  add_filter('comment_author', 'wptexturize');
  36  add_filter('comment_author', 'convert_chars');
  37  add_filter('comment_author', 'wp_specialchars');
  38  
  39  add_filter('comment_email', 'antispambot');
  40  
  41  add_filter('comment_url', 'clean_url');
  42  
  43  add_filter('comment_text', 'convert_chars');
  44  add_filter('comment_text', 'make_clickable');
  45  add_filter('comment_text', 'force_balance_tags', 25);
  46  add_filter('comment_text', 'wpautop', 30);
  47  add_filter('comment_text', 'convert_smilies', 20);
  48  
  49  add_filter('comment_excerpt', 'convert_chars');
  50  
  51  // Categories
  52  add_filter('pre_category_name', 'strip_tags');
  53  add_filter('pre_category_name', 'trim');
  54  add_filter('pre_category_name', 'wp_filter_kses');
  55  add_filter('pre_category_name', 'wp_specialchars', 30);
  56  add_filter('pre_category_description', 'wp_filter_kses');
  57  
  58  // Users
  59  add_filter('pre_user_display_name', 'strip_tags');
  60  add_filter('pre_user_display_name', 'trim');
  61  add_filter('pre_user_display_name', 'wp_filter_kses');
  62  add_filter('pre_user_display_name', 'wp_specialchars', 30);
  63  add_filter('pre_user_first_name', 'strip_tags');
  64  add_filter('pre_user_first_name', 'trim');
  65  add_filter('pre_user_first_name', 'wp_filter_kses');
  66  add_filter('pre_user_first_name', 'wp_specialchars', 30);
  67  add_filter('pre_user_last_name', 'strip_tags');
  68  add_filter('pre_user_last_name', 'trim');
  69  add_filter('pre_user_last_name', 'wp_filter_kses');
  70  add_filter('pre_user_last_name', 'wp_specialchars', 30);
  71  add_filter('pre_user_nickname', 'strip_tags');
  72  add_filter('pre_user_nickname', 'trim');
  73  add_filter('pre_user_nickname', 'wp_filter_kses');
  74  add_filter('pre_user_nickname', 'wp_specialchars', 30);
  75  add_filter('pre_user_description', 'trim');
  76  add_filter('pre_user_description', 'wp_filter_kses');
  77  add_filter('pre_user_url', 'strip_tags');
  78  add_filter('pre_user_url', 'trim');
  79  add_filter('pre_user_url', 'clean_url');
  80  add_filter('pre_user_email', 'trim');
  81  add_filter('pre_user_email', 'sanitize_email');
  82  
  83  // Places to balance tags on input
  84  add_filter('content_save_pre', 'balanceTags', 50);
  85  add_filter('excerpt_save_pre', 'balanceTags', 50);
  86  add_filter('comment_save_pre', 'balanceTags', 50);
  87  
  88  // Misc. title, content, and excerpt filters
  89  add_filter('the_title', 'convert_chars');
  90  add_filter('the_title', 'trim');
  91  
  92  add_filter('the_content', 'convert_smilies');
  93  add_filter('the_content', 'convert_chars');
  94  add_filter('the_content', 'wpautop');
  95  
  96  add_filter('the_excerpt', 'convert_smilies');
  97  add_filter('the_excerpt', 'convert_chars');
  98  add_filter('the_excerpt', 'wpautop');
  99  add_filter('get_the_excerpt', 'wp_trim_excerpt');
 100  
 101  add_filter('sanitize_title', 'sanitize_title_with_dashes');
 102  
 103  // RSS filters
 104  add_filter('the_title_rss', 'strip_tags');
 105  add_filter('the_title_rss', 'ent2ncr', 8);
 106  add_filter('the_content_rss', 'ent2ncr', 8);
 107  add_filter('the_excerpt_rss', 'convert_chars');
 108  add_filter('the_excerpt_rss', 'ent2ncr', 8);
 109  add_filter('comment_author_rss', 'ent2ncr', 8);
 110  add_filter('comment_text_rss', 'htmlspecialchars');
 111  add_filter('comment_text_rss', 'ent2ncr', 8);
 112  add_filter('bloginfo_rss', 'ent2ncr', 8);
 113  add_filter('the_author', 'ent2ncr', 8);
 114  
 115  // Misc filters
 116  add_filter('option_ping_sites', 'privacy_ping_filter');
 117  
 118  // Actions
 119  add_action('wp_head', 'rsd_link');
 120  add_action('publish_future_post', 'wp_publish_post', 10, 1);
 121  add_action('wp_head', 'noindex', 1);
 122  add_action('wp_head', 'wp_print_scripts');
 123  if(!defined('DOING_CRON'))
 124      add_action('init', 'wp_cron');
 125  add_action('do_feed_rdf', 'do_feed_rdf', 10, 1);
 126  add_action('do_feed_rss', 'do_feed_rss', 10, 1);
 127  add_action('do_feed_rss2', 'do_feed_rss2', 10, 1);
 128  add_action('do_feed_atom', 'do_feed_atom', 10, 1);
 129  add_action('do_pings', 'do_all_pings', 10, 1);
 130  add_action('do_robots', 'do_robots');
 131  add_action('sanitize_comment_cookies', 'sanitize_comment_cookies');
 132  ?>

Your comment here...

Name: Location:
Comments:


List: Classes | Functions | Variables | Constants | Tables

Generated: Sat Jul 15 11:57:04 2006 Courtesy of Taragana