Changes from branches/3.0/wp-includes/default-filters.php at r17406 to trunk/wp-includes/default-filters.php at r17465
- File:
-
- 1 edited
-
trunk/wp-includes/default-filters.php (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/default-filters.php
r17406 r17465 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 add_filter( $filter, 'sanitize_text_field' ); 25 add_filter( $filter, 'wp_kses_data' ); 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 } 26 29 add_filter( $filter, '_wp_specialchars', 30 ); 27 30 } … … 33 36 34 37 // Kses only for textarea admin displays 35 foreach ( array( 'term_description', 'link_description', 'link_notes', 'user_description', 'comment_text' ) as $filter ) { 36 add_filter( $filter, 'wp_kses_data' ); 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' ); 37 43 } 38 44 … … 44 50 } 45 51 46 // Email display52 // Email admin display 47 53 foreach ( array( 'comment_author_email', 'user_email' ) as $filter ) { 48 54 add_filter( $filter, 'sanitize_email' ); 49 add_filter( $filter, 'wp_kses_data' ); 55 if ( is_admin() ) 56 add_filter( $filter, 'wp_kses_data' ); 50 57 } 51 58 … … 60 67 // Display URL 61 68 foreach ( array( 'user_url', 'link_url', 'link_image', 'link_rss', 'comment_url' ) as $filter ) { 62 add_filter( $filter, 'wp_strip_all_tags' ); 69 if ( is_admin() ) 70 add_filter( $filter, 'wp_strip_all_tags' ); 63 71 add_filter( $filter, 'esc_url' ); 64 add_filter( $filter, 'wp_kses_data' ); 72 if ( is_admin() ) 73 add_filter( $filter, 'wp_kses_data' ); 65 74 } 66 75 … … 91 100 92 101 // Format WordPress 93 foreach ( array( 'the_content', 'the_title' , 'comment_text') as $filter )102 foreach ( array( 'the_content', 'the_title' ) as $filter ) 94 103 add_filter( $filter, 'capital_P_dangit', 11 ); 104 add_filter( 'comment_text', 'capital_P_dangit', 31 ); 95 105 96 106 // Format titles … … 113 123 } 114 124 125 // Pre save hierarchy 126 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 115 129 // Display filters 116 130 add_filter( 'the_title', 'wptexturize' ); … … 142 156 143 157 add_filter( 'list_cats', 'wptexturize' ); 144 add_filter( 'single_post_title', 'wptexturize' );145 158 146 159 add_filter( 'wp_sprintf', 'wp_sprintf_l', 10, 2 ); … … 202 215 add_action( 'wp_head', 'wp_shortlink_wp_head', 10, 0 ); 203 216 add_action( 'template_redirect', 'wp_shortlink_header', 11, 0 ); 217 218 // Login actions 219 add_action( 'login_head', 'wp_print_head_scripts', 9 ); 220 add_action( 'login_footer', 'wp_print_footer_scripts' ); 204 221 205 222 // Feed Generator Tags … … 257 274 add_action( 'admin_color_scheme_picker', 'admin_color_scheme_picker' ); 258 275 276 unset($filter, $action); 277 259 278 ?>
Note: See TracChangeset
for help on using the changeset viewer.