Changes from trunk/wp-includes/default-filters.php at r17465 to branches/3.0/wp-includes/default-filters.php at r17406
- File:
-
- 1 edited
-
branches/3.0/wp-includes/default-filters.php (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/3.0/wp-includes/default-filters.php
r17465 r17406 22 22 // Strip, kses, special chars for string display 23 23 foreach ( array( 'term_name', 'comment_author_name', 'link_name', 'link_target', 'link_rel', 'user_display_name', 'user_first_name', 'user_last_name', 'user_nickname' ) as $filter ) { 24 if ( is_admin() ) { 25 // These are expensive. Run only on admin pages for defense in depth. 26 add_filter( $filter, 'sanitize_text_field' ); 27 add_filter( $filter, 'wp_kses_data' ); 28 } 24 add_filter( $filter, 'sanitize_text_field' ); 25 add_filter( $filter, 'wp_kses_data' ); 29 26 add_filter( $filter, '_wp_specialchars', 30 ); 30 27 } … … 36 33 37 34 // Kses only for textarea admin displays 38 if ( is_admin() ) { 39 foreach ( array( 'term_description', 'link_description', 'link_notes', 'user_description' ) as $filter ) { 40 add_filter( $filter, 'wp_kses_data' ); 41 } 42 add_filter( 'comment_text', 'wp_kses_post' ); 35 foreach ( array( 'term_description', 'link_description', 'link_notes', 'user_description', 'comment_text' ) as $filter ) { 36 add_filter( $filter, 'wp_kses_data' ); 43 37 } 44 38 … … 50 44 } 51 45 52 // Email admindisplay46 // Email display 53 47 foreach ( array( 'comment_author_email', 'user_email' ) as $filter ) { 54 48 add_filter( $filter, 'sanitize_email' ); 55 if ( is_admin() ) 56 add_filter( $filter, 'wp_kses_data' ); 49 add_filter( $filter, 'wp_kses_data' ); 57 50 } 58 51 … … 67 60 // Display URL 68 61 foreach ( array( 'user_url', 'link_url', 'link_image', 'link_rss', 'comment_url' ) as $filter ) { 69 if ( is_admin() ) 70 add_filter( $filter, 'wp_strip_all_tags' ); 62 add_filter( $filter, 'wp_strip_all_tags' ); 71 63 add_filter( $filter, 'esc_url' ); 72 if ( is_admin() ) 73 add_filter( $filter, 'wp_kses_data' ); 64 add_filter( $filter, 'wp_kses_data' ); 74 65 } 75 66 … … 100 91 101 92 // Format WordPress 102 foreach ( array( 'the_content', 'the_title' ) as $filter )93 foreach ( array( 'the_content', 'the_title', 'comment_text' ) as $filter ) 103 94 add_filter( $filter, 'capital_P_dangit', 11 ); 104 add_filter( 'comment_text', 'capital_P_dangit', 31 );105 95 106 96 // Format titles … … 123 113 } 124 114 125 // Pre save hierarchy126 add_filter( 'wp_insert_post_parent', 'wp_check_post_hierarchy_for_loops', 10, 2 );127 add_filter( 'wp_update_term_parent', 'wp_check_term_hierarchy_for_loops', 10, 3 );128 129 115 // Display filters 130 116 add_filter( 'the_title', 'wptexturize' ); … … 156 142 157 143 add_filter( 'list_cats', 'wptexturize' ); 144 add_filter( 'single_post_title', 'wptexturize' ); 158 145 159 146 add_filter( 'wp_sprintf', 'wp_sprintf_l', 10, 2 ); … … 215 202 add_action( 'wp_head', 'wp_shortlink_wp_head', 10, 0 ); 216 203 add_action( 'template_redirect', 'wp_shortlink_header', 11, 0 ); 217 218 // Login actions219 add_action( 'login_head', 'wp_print_head_scripts', 9 );220 add_action( 'login_footer', 'wp_print_footer_scripts' );221 204 222 205 // Feed Generator Tags … … 274 257 add_action( 'admin_color_scheme_picker', 'admin_color_scheme_picker' ); 275 258 276 unset($filter, $action);277 278 259 ?>
Note: See TracChangeset
for help on using the changeset viewer.