Make the xmlrpc user the current user. fixes #2273

git-svn-id: https://develop.svn.wordpress.org/trunk@3430 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren
2006-01-13 19:19:09 +00:00
parent 835a8b9992
commit ba8e3e8d47
3 changed files with 65 additions and 27 deletions

View File

@@ -530,9 +530,17 @@ function kses_init_filters() {
function kses_init() {
global $current_user;
get_currentuserinfo(); // set $current_user
remove_filter('pre_comment_author', 'wp_filter_kses');
remove_filter('pre_comment_content', 'wp_filter_kses');
remove_filter('content_save_pre', 'wp_filter_post_kses');
remove_filter('title_save_pre', 'wp_filter_kses');
if (! defined('XMLRPC_REQUEST') )
get_currentuserinfo();
if (current_user_can('unfiltered_html') == false)
kses_init_filters();
}
add_action('init', 'kses_init');
add_action('set_current_user', 'kses_init');
?>