WordPress.org

Make WordPress Core

Changeset 2934


Ignore:
Timestamp:
10/05/2005 11:58:16 PM (16 years ago)
Author:
ryan
Message:

Add kses_init_filters(). Call it when running importers.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/admin.php

    r2872 r2934  
    8989
    9090    define('WP_IMPORTING', true);
     91    kses_init_filters();  // Always filter imported data with kses.
    9192
    9293    call_user_func($wp_importers[$importer][2]);
  • trunk/wp-includes/kses.php

    r2924 r2934  
    514514}
    515515
    516 function kses_init() {
    517     global $current_user;
    518 
    519     get_currentuserinfo(); // set $current_user
    520     if (current_user_can('unfiltered_html') == false) {
     516function kses_init_filters() {
    521517        add_filter('pre_comment_author', 'wp_filter_kses');
    522518        add_filter('pre_comment_content', 'wp_filter_kses');
    523519        add_filter('content_save_pre', 'wp_filter_post_kses');
    524     }
     520}
     521
     522function kses_init() {
     523    global $current_user;
     524
     525    get_currentuserinfo(); // set $current_user
     526    if (current_user_can('unfiltered_html') == false)
     527        kses_init_filters();
    525528}
    526529add_action('init', 'kses_init');
Note: See TracChangeset for help on using the changeset viewer.