Changeset 11929 for trunk/wp-includes/default-filters.php
- Timestamp:
- 09/14/2009 01:57:48 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/default-filters.php
r11777 r11929 18 18 'pre_user_nickname'); 19 19 foreach ( $filters as $filter ) { 20 add_filter($filter, 'strip_tags'); 20 add_filter($filter, 'sanitize_text_field'); 21 add_filter($filter, 'wp_filter_kses'); 22 add_filter($filter, '_wp_specialchars', 30); 23 } 24 25 // Strip, kses, special chars for string display 26 $filters = array('term_name', 'comment_author_name', 'link_name', 'link_target', 'link_rel', 'user_display_name', 'user_first_name', 'user_last_name', 'user_nickname'); 27 foreach ( $filters as $filter ) { 28 add_filter($filter, 'sanitize_text_field'); 29 add_filter($filter, 'wp_filter_kses'); 30 add_filter($filter, '_wp_specialchars', 30); 31 } 32 33 // Kses only for textarea saves and displays 34 $filters = array('pre_term_description', 'term_description', 'pre_link_description', 'link_description', 'pre_link_notes', 'link_notes', 'pre_user_description', 'user_description'); 35 foreach ( $filters as $filter ) { 36 add_filter($filter, 'wp_filter_kses'); 37 } 38 39 // Email saves 40 $filters = array('pre_comment_author_email', 'pre_user_email'); 41 foreach ( $filters as $filter ) { 21 42 add_filter($filter, 'trim'); 22 add_filter($filter, 'wp_filter_kses'); 23 add_filter($filter, '_wp_specialchars', 30); 24 } 25 26 // Kses only for textarea saves 27 $filters = array('pre_term_description', 'pre_link_description', 'pre_link_notes', 'pre_user_description'); 28 foreach ( $filters as $filter ) { 29 add_filter($filter, 'wp_filter_kses'); 30 } 31 32 // Email 33 $filters = array('pre_comment_author_email', 'pre_user_email'); 34 foreach ( $filters as $filter ) { 35 add_filter($filter, 'trim'); 43 add_filter($filter, 'sanitize_email'); 44 add_filter($filter, 'wp_filter_kses'); 45 } 46 47 // Email display 48 $filters = array('comment_author_email', 'user_email'); 49 foreach ( $filters as $filter ) { 36 50 add_filter($filter, 'sanitize_email'); 37 51 add_filter($filter, 'wp_filter_kses'); … … 42 56 'pre_link_rss'); 43 57 foreach ( $filters as $filter ) { 44 add_filter($filter, 'strip_tags'); 45 add_filter($filter, 'trim'); 58 add_filter($filter, 'wp_strip_all_tags'); 46 59 add_filter($filter, 'esc_url_raw'); 47 60 add_filter($filter, 'wp_filter_kses'); … … 51 64 $filters = array('user_url', 'link_url', 'link_image', 'link_rss', 'comment_url'); 52 65 foreach ( $filters as $filter ) { 53 add_filter($filter, 'strip_tags'); 54 add_filter($filter, 'trim'); 66 add_filter($filter, 'wp_strip_all_tags'); 55 67 add_filter($filter, 'esc_url'); 56 68 add_filter($filter, 'wp_filter_kses');
Note: See TracChangeset
for help on using the changeset viewer.