Make WordPress Core


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

Add kses_init_filters(). Call it when running importers.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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.