diff --git a/wp-includes/functions.php b/wp-includes/functions.php index d166e0549..cb2798344 100644 --- a/wp-includes/functions.php +++ b/wp-includes/functions.php @@ -629,10 +629,8 @@ function xmlrpc_getposttitle($content) { function xmlrpc_getpostcategory($content) { global $post_default_category; if (preg_match('/(.+?)<\/category>/is', $content, $matchcat)) { - $post_category = $matchcat[0]; - $post_category = preg_replace('//si', '', $post_category); - $post_category = preg_replace('/<\/category>/si', '', $post_category); - + $post_category = trim($matchcat[1], ','); + $post_category = explode(',', $post_category); } else { $post_category = $post_default_category; }